HTML and CSS Reference
ending with a .js extension. The src attribute is assigned the name of the file, which can
be prefixed with its location (e.g., a directory tree or URL).
When you create a program in any language, the first thing you want to see is the output
the browser window. Of course, browsers use HTML to format output. Although Java-
Script doesn't understand HTML per se, it can generate HTML output with its built-in
methods, write() and writeln() .
A string is a character or set of characters enclosed in matching quotes. Because the meth-
ods used to display text take strings as their arguments, this is a good time to talk a little
All strings must be placed within a matched set of either single or double quotes; for exam-
"this is a string" or 'this is a string'
Double quotes can hide single quotes; for example:
"I don't care"
And single quotes can hide double quotes; for example:
'He cried, "Ahoy!"'
Either way, the entire string is enclosed in a set of matching quotes.
Concatenation is caused when two strings are joined together. The plus (+) sign is
used to concatenate strings; for example: