in操作符: 查找对象中属性是不是存在,如果存在,返回true,如果不存在,返回false console.log("name" in person5);//判断name属性在对象person5中是否存在 hasOwnProperty(): 查找对象中的属性是不是在这个对象中定义的 console.log(pson1.hasOwnProperty("name"));//判断属性nam
专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]
Copyright (C)ICode9.com, All Rights Reserved.
ICode9版权所有