javascript check if object property exists

JavaScript
var person = {'first_name': 'bill','age':20};

if ( person.hasOwnProperty('first_name') ) {
    //person has a first_name property
}
myObj.hasOwnProperty(myProp)
Source

Also in JavaScript: