javascript equivalent of php isset code example Example: isset js if (typeof obj.foo !== 'undefined') { }