Comment on JS performance: try / catch versus checking for undefined Comments−underwater14yWorth noting that `undefined` is a variable, and not a keyword. undefined = 1; >>> 1 null = 1; >>> ReferenceError: invalid assignment left-hand side It looks like Chrome and Firefox no longer let you assign to window.undefined any, but I'm not sure is IE has the same restrictions. The correct way to check for undefined is via `typeof`.
Comments
Worth noting that `undefined` is a variable, and not a keyword.
It looks like Chrome and Firefox no longer let you assign to window.undefined any, but I'm not sure is IE has the same restrictions. The correct way to check for undefined is via `typeof`.