+ 1
Why is it var xxx=prompt(); and not just prompt();?
Why are prompt and confirm type popupboxes defined as a variable and alert type popupboxes arent?
3 Respuestas
+ 8
@Nachtwind because you want to store what was entered in a prompt(a string) or a confirm (a boolean) in a variable for later reference
+ 2
thank you both for the answers, I understand now:)