0

How can I check if the result given by the user is correct using javascript and html

https://code.sololearn.com/W0y4STn3jJUV/?ref=app

24th Oct 2018, 8:40 PM
Nia
2 Respostas
+ 1
store the result in 1 variable, ex: if(op=='+') result=number1+number2; if(op=='-') result=number1-number2; ... then at the end compare the result by user with this result if(result==resultByUser) //doSomething
24th Oct 2018, 9:27 PM
Taste
Taste - avatar
0
Taste wow it was that easy thank you so much
24th Oct 2018, 11:01 PM
Nia