javascript if element in object code example
Example: how to check if object has key javascript
myObj.hasOwnProperty('key') // it checks object for particular key and not on prototype
myObj.hasOwnProperty('key') // it checks object for particular key and not on prototype