var x = { y: 10 }; console.log(x.hasOwnProperty("y")); //true console.log(x.hasOwnProperty("z")); //false