Possible Duplicate:
php isset() equivalent in javascript
PHP example: http://codepad.viper-7.com/vo4wGI
<?php
var_dump( isset($something['deep']->property) ); // false
# because well, there is no such thing defined at all
JS kind of equivalent: http://jsfiddle.net/psycketom/Lp83m/ but doesn't work, because browsers appear to lookup the value first before trying to resolve it's type, and, if it's not found, you get
console.log( typeof something['deep'].property ); // Uncaught ReferenceError: something is not defined
Is there a native function in JavaScript to properly resolve deep undefined properties?