The variable Statement

variable is a statement you already know how to use, and it is included here only to reinforce the idea of a statement being similar to a complete sentence in English. Therefore, a variable statement such as

var this_year = 2001

says to create a variable called this_year and assign it the value 2001. That's a complete sentence.

Get JavaScript™ 1.5 by Example 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.