"Andrew Poulos" wrote
if (foo == undefined)
Make that:
if( typeof foo === 'undefined' ) {
}
Other types are 'string', 'object' and 'function'.
See for example (watch for wrap)
<URL:
http://www.devguru.com/Technologies/...l_operators.ht
ml#typeof >
a number returns 'number';
a string returns 'string';
the keyword true returns 'boolean';
the keyword null returns 'object';
methods, functions and predefined objects return 'function';
a variable returns the type of the data assigned to it;
a property returns the type of its value;
--
Ivo
http://4umi.com/web/links.htm