Code from the book: Head First - JavaScript