function Person(name, age, height , weight){
this.name = name.toLowerCase().replace(/\b[a-z]/g, function(letter) {
return letter.toUpperCase();
});;
this.age = age;
this.height = height;
this.weight = weight;
this.bmi = function(){
return (this.weight/(this.height/100)**2);
}
this.SayName = function(){
return "MyNameIS:"+ this.name;
}
}
var mohamad = new Person('Mohamad Nazari', 20 , 170 ,70);
console.log(mohamad);
console.log(mohamad.bmi());