Posted By

magna on 02/12/11


Tagged


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

aaearhart


determine if a variable is defined


 / Published in: JavaScript
 

  1. /** helper to determine if a variable is defined
  2.  */
  3. function isDefined(foo) {
  4. return 'undefined' !== typeof(foo) && null != foo;
  5. }

Report this snippet  

You need to login to post a comment.