I am trying to use the || operator as the "default" operator as described by Crockford at (http://www.crockford.com/javascript/survey.html):
The || operator is commonly called logical or. It can also be called default. If the first operand is false, null, undefined, "" (the empty string), or the number 0, then it returns the second operand. Otherwise, it returns the first operand. This provides a convenient way to specify default values:
value = v || 10; /* Use the value of v, but if v
doesn't have a value, use 10 instead. */
When I type that into the firebug javascript console it reports an error: ReferenceError: v is not defined, and does not go on to set value to 10.
Is that expected behavior?