HTML and CSS Reference
The value null is assigned to the variable called job_title . Null is used to set a vari-
able to an initial value different from other valid types, but if used in an expression
the value of null will be converted to the appropriate type.
The document head ends here.
The body of the document starts here.
document are available here. Variables that are available throughout the entire
document are called global variables.
The document.write() method concatenates the values of the strings with the +
sign and sends them to the browser to display on the screen.
The value of the variable called age is displayed.
The variable called ssn was declared, but not initialized. It has no value, which
The variable job_title was assigned null , a placeholder value. The null string is re-
The variable ssn is assigned a string value. It is no longer undefined . Even though
the variable was declared in the head of the document, as long as it was declared,
it can be assigned a value anywhere else in the document.
The value of the variable ssn is displayed. Figure 3.6 shows the output in Internet
Figure 3.6 Declaring and displaying variables.