function Person(name, age, height, wight){ this.name = name; this.age = age; this.height = height; this.wight = wight; this.personName = function(){ let captalFirst = this.name; return "My name is" + ' ' + captalFirst.charAt(0).toUpperCase() + captalFirst.slice(1) }; this.personBmi = function (){ let ibmPer = this.wight / ((this.height / 100 ) **2).toFixed(2) return "My BMI is" + " " + ibmPer; } } let parisa = new Person('ali', '34', '160', '58'); console.log(parisa,); console.log(parisa.personName()); console.log(parisa.personBmi());