+ 1

How to use || in prompt questions

Is there a mistake in this because when I type any other thing it shows same thing o = prompt("say Addition"); if (o == "Addition"||"+"){ alert("good"); }

17th Jul 2019, 3:41 PM
Harshey's
Harshey's - avatar
2 Answers
+ 1
if(o == “Addition” || o == “+”)
17th Jul 2019, 4:43 PM
Jake
Jake - avatar
+ 1
Oh ok thanks
17th Jul 2019, 4:43 PM
Harshey's
Harshey's - avatar