var obj = { name:'张三',age:18}; obj.hasOwnProperty('name'); // --> true obj.hasOwnProperty('id'); // --> false