February 4, 2000|
Tips: February 2000
Yehuda Shiran, Ph.D.
Now enter a two-statement URL:
Notice the alternation of quotes. Since the
URL shouldn't return any value. For example, the alert() method doesn't return
a value; in other words, it returns undefined. If the statement returns undefined,
the browser simply executes it. However, if it returns an explicit value, the
returned value in the body of the page.
When taking advantage of the
The void operator evaluates its expression, and returns undefined. The parentheses surrounding the expression are optional, but they are important when writing compact, one-line scripts. If you're not sure if a statement returns a value, use the void operator to stay on the safe side.
When inserting several statements in a single
Note that the entire
Learn more about the