1、数组是否存在元素,是否存在key? console.log(num.hasOwnProperty('c')); 转载于:https://www.cnblogs.com/liwuming/p/10119766.html