On 2/4/11, mcot atm1...@gmail.com wrote:
Hi. I am still reading up on this but here are some more tests I have
run:
console.log(typeof(foo) === 'undefined'); // true -- doesn't raise
reference error.
foo; // reference
error
http://javascriptweblog.wordpress.com/2010/08/16/understanding-undefined-and-preventing-referenceerrors/
On Feb 4, 4:16 pm, Jason Persampieri ja...@persampieri.net wrote:
On Fri, Feb 4, 2011 at 4:07 PM, Michael Geary m...@mg.to wrote:
The first two cases are identical to each other, because
Hi. I am still reading up on this but here are some more tests I have
run:
console.log(typeof(foo) === 'undefined'); // true -- doesn't raise
reference error.
foo;// reference
error even without the call to console.log
--
To
By the way I am running these tests in the spidermonkey shell and in
chrome using the dev tools. I substitute console.log for print() in
the spidermonkey shell.
On Feb 4, 10:54 pm, mcot atm1...@gmail.com wrote:
Hi. I am still reading up on this but here are some more tests I have
run:
Yes, that's correct. The typeof operator does not require its operand to be
defined. When its operand is not defined, typeof returns the string
'undefined'. All correct, expected behavior.
On Fri, Feb 4, 2011 at 7:54 PM, mcot atm1...@gmail.com wrote:
Hi. I am still reading up on this but here
On Fri, Feb 4, 2011 at 10:54 PM, mcot atm1...@gmail.com wrote:
Hi. I am still reading up on this but here are some more tests I have
run:
console.log(typeof(foo) === 'undefined'); // true -- doesn't raise
reference error.
foo;