+ 2

Why conditional (Ternary) Operator not working in code bit

Please someone find what's the problem in my code bit and explaine me what's wrong with code bit https://code.sololearn.com/WV99bUREuZ8c/?ref=app - See it in JavaScript code section

7th Mar 2020, 2:20 AM
Dipanshu Sahu
4 odpowiedzi
+ 4
Dipanshu Sahu 'is young' is an invalid variable name as Avinesh said. You cannot have a space character in a variable name. As Gordon points out using the camel back variable naming method, isYoung, will resolve the error.
7th Mar 2020, 3:22 AM
Paul K Sadler
Paul K Sadler - avatar
+ 3
There should not be any space between the variable name.
7th Mar 2020, 2:28 AM
Avinesh
Avinesh - avatar
+ 2
Paul K Sadler Gordon Avinesh Thanks a lot. I understood that there is no space between variable name
7th Mar 2020, 8:30 AM
Dipanshu Sahu
0
As Avinesh says, you should use camel back instead - isYoung.
7th Mar 2020, 2:54 AM
Gordon
Gordon - avatar