+ 1
Why it is showing error?
While I was trying to solve a function about age it was showing wrong.What is the prblm here? var age=26; var ageStat=(age<10)?"Child":(age<18)?"young":(age<40)?"Mature":(age>40)?"Old"; document.write(ageStat);
2 Answers
+ 6
// the last one has to be an answer
var age=26;
var ageStat=(age<10)?"Child":(age<18)?"young":(age<40)?"Mature":"Old";
document.write(ageStat);
+ 2
Thanks a lot