javascript if array key exists

JavaScript
var person={"name":"Billy","age":20}
person.hasOwnProperty("name"); // true
person.hasOwnProperty("sex"); // falseif (obj.hasOwnProperty("key1")) {
  ...
}"key" in obj // true, regardless of the actual value
Source

Also in JavaScript: