+ 3

Making calculator using if else in Java Script.

Whats wrong in this?? I'm new in js so i don't know much about it. https://code.sololearn.com/WwWrYAukVi6v/?ref=app

2nd Dec 2017, 9:04 AM
A N S H U L S I N G H
A N S H U L   S I N G H - avatar
7 Answers
+ 7
2 errors In row 5 remove parseint, you want a String not an Int. In all 4 if statements change = to == you are not assigning, rather comparing. https://code.sololearn.com/WMs38yag41tR/?ref=app
2nd Dec 2017, 10:08 AM
Louis
Louis - avatar
+ 3
@Charan Leo25 in switch (expression) what should i write???
2nd Dec 2017, 11:25 AM
A N S H U L S I N G H
A N S H U L   S I N G H - avatar
29th Apr 2018, 3:20 PM
Programmer Gaurav
Programmer Gaurav - avatar
+ 2
https://code.sololearn.com/WwWrYAukVi6v/?ref=app
2nd Dec 2017, 9:05 AM
A N S H U L S I N G H
A N S H U L   S I N G H - avatar
+ 2
but when i choose - or * or / it never do that.... it always add the number
2nd Dec 2017, 9:24 AM
A N S H U L S I N G H
A N S H U L   S I N G H - avatar