The operator in can be used to test whether an object has a certain property. var person = {} person.name = "buhaiqing" console.debug( "name" in person) // return : true 转载于:https://www.cnblogs.com/buhaiqing/archive/2012/12/04/2801040.html