Trying to make my own adventure


#1

what am i doing wrong?

confirm("are you ready to play!?");
var chocolate = prompt("do you like chocolate?")
if(chocolate === yes) {
    alert("good");
} else (chocolate === no) {
    console.log("why?"); 
}
prompt();

#2

Does an else statement take a condition?


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.