Posted By

wizard04 on 11/04/09


Tagged

javascript keyword constant undefined reserved


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

nerdfiles


Reset 'undefined' Variable


 / Published in: JavaScript
 

undefined is simply an undefined global variable. It is not a literal or a constant, though it is often used as if it is. Its value can be changed. To be sure its type is actually "undefined", redefine it at the beginning of your script files.

  1. /****************************************
  2. `undefined` is simply an undefined global variable. It is not a literal or a constant, though it is often used as if it is. Its value can be changed. To be sure its type is actually "undefined", redefine it at the beginning of your script files.
  3. /****************************************/
  4.  
  5. undefined = (function(){var u; return u;})();

Report this snippet  

You need to login to post a comment.