Summary

This chapter was chock-full of JavaScript goodness. Here's a review of the most important points for you to understand:

  • How to declare and use variables (use var the first time and use valid and descriptive variable names)

  • How to write to web pages with document.write()

  • How to get the current date from JavaScript with the Date object and its various methods

If you got all that, you're well on your way to becoming a JavaScript superstar. Try the following assignment to test your JavaScript skills.

Get The Book of JavaScript, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.