if ('key' in myObj) // better if (!myObj.hasOwnProperty('key'))
if('key' in object)
if (myObj['key']) { // Do something }
console.log("key" in obj)
Object.prototype.hasOwnProperty()