Why would Javascript `if…else if` not end with an `else`?

后端 未结 8 1887
误落风尘
误落风尘 2020-12-16 02:23

Here is a snippet of JavaScript code from a tutorial I was working with. I don’t understand why it doesn’t end with a final else clause; I thought that was a ru

8条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-16 03:04

    change the if condition for answer validation if(answer==100) to if(answer===100) it is working fine now...

提交回复
热议问题