摘要:
var arr1 = []; arr1[0] = 1; arr1[1] = 2; arr1[2] = 3; console.log(arr1.length); //输出结果:3 var arr2 = []; arr2[0] = 1; arr2[1] = 2; arr2.foo = 3; console.log(arr2.length); //输出结果:2 var arr3 = []; arr... 阅读全文
摘要:
typeof:返回值是一个字符串,一般只能返回以下结果 number、string、object、boolean、undefined、function、symbol instanceof object instanceof constructor (object: 要检测的对象 constructo 阅读全文