What's wrong in this calculator using switch case | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
31st Jan 2020, 9:52 AM
Rushi
2 Answers
+ 5
nothing wrong, you just need to parse the input into a number. because right now, its a string parseInt(yourVar) should do
31st Jan 2020, 9:57 AM
Taste
Taste - avatar
+ 1
Ohhh my bad... thanks bro
31st Jan 2020, 9:58 AM
Rushi