Why Conditional Operator Is Not Working? | JS | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 1

Why Conditional Operator Is Not Working? | JS

When I put numeric value in place of variable, it works! But when I use variable, it shows error, Why??? https://code.sololearn.com/W29bWk0rcN75/?ref=app

4th Jul 2020, 7:42 PM
Himanshu Rai
Himanshu Rai - avatar
2 Answers
+ 1
Himanshu Rai put the semi colon after prompt("text) ;
4th Jul 2020, 7:59 PM
Jayakrishna 🇮🇳
0
Bagon okk. But can you answer why parentheses causing error? Or what is the problem these parentheses producing?
4th Jul 2020, 7:52 PM
Himanshu Rai
Himanshu Rai - avatar