If(confirm("Shall we play a game?") === false) {console.log("Bye!");}


I'm having a hard time making this work. I'm trying to use the boolean returned from the confirm statement to use a condition for the if loop. Any thoughts?


Hey @chancecarmichael! You should just set the confirm to be a variable! So do this


   var confirming = confirm("Shall we play a game");

Then the conditon and also you should put false as a string(whitch is
where the problems comes in):

   if(confirming== "false"){

Hope this helped! If it didnt please reply saying so!


Alright, that worked pretty well thanks. Should've known I could've just used a variable for something like that.


No Problem Glad to help!