HTML and CSS Reference
3. Is an expression that evaluates to the value 0 true or false? How about the string
“false” inside quotation marks?
4. How do you make sure that a variable you create in a function is only visible
locally in that function?
5. How are functions different from methods?
ment, Netscape introduced the <script> tag. By placing a <script> tag in a docu-
ment, you tell the web browser to treat any lines of text inside the tag as script
rather than as content for the web page.
2. Events are special actions triggered by things happening in the system (windows
opening, pages being loaded, forms being submitted) or by reader input (text being
can perform different operations in response to these events.
3. The number 0 is false, and the string “false” is true. The only false values are 0 ,
null , an empty string, undefined , NaN (not a number), and the Boolean value
4. The var statement is used to define a local variable inside a function.
5. Methods are associated with a specific object, and functions are standalone rou-
tines that operate outside the bounds of an object.
1. If you haven't done so already, take a few minutes to explore the documentation
weren't included in earlier versions.
page or in an archive of scripts. Look at the source code and see whether you can
decode its logic and how it works.