+ 4

i am too much cunfused about java script 😕😕😱 nothing to understand

any one tell me java dscript values

18th Jul 2018, 5:00 PM
Ahmad Mughal
Ahmad Mughal - avatar
1 RĂ©ponse
+ 9
if(condition is true) { doSomething(); } else if(condition is true) { doSomethingElse(); } else { doSomethingEntirelyDifferent(); } E.g. var age = 60; if(age<=10) { console.log("Kid"); } else if(age>=13 && age<=17) { console.log("Puberty"); } else if(age>=18 && age<=50) { console.log("Adult"); } else { console.log("Grandpa"); }
19th Jul 2018, 8:34 AM
Haris
Haris - avatar