I haven't done anything wrong



Store the prompt in a variable


Also null probably means you pressed cancel maybe just enter something.


I'm having the same problem. Sorry how do you do that? (I'm completely new to this)


lets say i call my variable


I can store the prompt in it like this

user_answer = prompt("The question you wish to ask the user here");


I'm pasting exactly the same code and it's not working :confused:


Irene, technically Rydan's code that he provided should work. As you stated that you are copying and pasting the code have you tried to re-type the punctuation, from my experience with coding sometimes if you copy and paste code into a text editor or IDE, it doesn't like it. Alternatively if you are still struggling with this question please forward me a print screen of your error message and I will be happy to help :grinning:.


That's right some sites don't use plain text but some formatting stuff or funny tokens for `'" aso but afaik this should work. Also it often helps to refresh the page if there is no obvious error.