Prompt and Confirm statements


#1

The 'var age = prompt("What is but your age?");
confirm ("age");'
The above statements initially worked, but now the code just ignores them. What is going on?


#2

Hi Walt42,

Could you please give a link to the exercise you're on?
Thanks :slightly_smiling:

Also, the problem is that you can't have quotes around variable names - change line 2 to look like this instead:

confirm(age);

...although I'm not usre that's even how you're supposed to do it - I would need to take a look at the exercise to know.


#3

¡Hacé clic en “Guardar y enviar” para ver un ejemplo de cómo JavaScript puede ser interactivo!