Week 13 of a JavaScript course and you are only up to using for loops? Or does the course cover a number of web languages and you are just onto the small section of the course that attempts to cover JavaScript?
Which book is it? There have been one or two JavaScript books that I know of that were published after 2006 that still taught antiquated code like that but none that I know of that were published as recently as 2011.
Here's how a prompt looks in some browsers now - note the checkbox for turning off JavaScript (some other browsers have the checkbox simply stop any further prompts from appearing instead so that the following code would run but using an empty string for the remaining inputs):