+ 4
Oh wait. Wait. Wait. I got the problem. Your numbers are not numbers (as in integers), they are strings!
22nd Nov 2018, 4:20 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
+ 3
When numbers are inputted the program works fine. What you have handled wrongly is the no input case. If (num1)||(num2==NaN) is what your 3rd condition does. You need to do: if (num1==NaN||num2==NaN)
22nd Nov 2018, 4:14 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
+ 3
Jack Rehfeldt Look at my edited answer
22nd Nov 2018, 4:25 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
+ 2
I remember one neat "hacks" which is simply, add a + Edit: var prompt1 = +prompt("Hey"); var prompt2 = +prompt("There"); Like that
22nd Nov 2018, 4:23 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar