Need urgent help with a simple javascript code

prompt stores the input as string, comparing strings with integers is very tricky. cast userChoice to a integer

i would use a switch statement in this case, but that is outside the scope of this question

3 Likes