+ 1

Prompt Value

How do you assign a certain thing to execute when a certain value is input on a prompt?

12th Nov 2017, 6:24 PM
The A.I. Future Guy
The A.I. Future Guy - avatar
1 Answer
+ 2
You just use an if statement. if prompt == "Secret message" { alert("Yay!"); }
12th Nov 2017, 9:40 PM
Private [GER]
Private [GER] - avatar