تابستون داره تموم میشه ها، فرصت‌ها محدودن کلی آفر جذاب در کمپین تابستون🔥👇
۰ ثانیه
۰ دقیقه
۰ ساعت
۱ محمد حسین نظری
پاسخ تمرین جلسه
جامعه جاوا اسکریپت ایجاد شده در ۱۳ تیر ۱۴۰۰
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());

سلام

خوبه فقط چه دلیلی داشته که اول کاراکترها را کوچیک کنید و بعد بزرگ؟ جهت اطمینان بوده درسته؟ 

مهرداد دادخواه ۰۲ آبان ۱۴۰۰، ۰۳:۰۴