Posted By

dmistriotis on 11/04/10


Tagged

javascript object existance


Versions (?)

Check if object exists


 / Published in: JavaScript
 

URL: http://tech.chitgoks.com/2008/06/30/javascript-check-if-object-is-valid/

  1. function isValidObject(objToTest) {
  2. if (null == objToTest) return false;
  3. if ("undefined" == typeof(objToTest)) return false;
  4. return true;
  5. }

Report this snippet  

You need to login to post a comment.