check for a key in an 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