查看键值对中是否有指定的key:
ary.hasOwnProperty(key); 或 obj.hasOwnProperty(key);
js随笔(一)
原文:https://www.cnblogs.com/Lyh1997/p/9952110.html