+ 2
I can't get my javascript alerts to show up
Right now I am using Javascript to try to create a series of alerts for a story but I can't get all of the prompts to show up. Can somebody help me? https://code.sololearn.com/WIqhAnqGq3kK/#js
2 Respostas
+ 2
In line 26, you're assigning the value of an undefined variable callForHelp to variable choice.
Also, There are no prompts.
+ 2
Store all the options callForHelp, takeShortcut and wait into a single object.
After line 30, add the prompt.
Assign the input to a variable.
Then do alert(obj[input]).