已采纳回答 / TakeitEasy0
先是判断两个是否都为数组,然后判断两数组长度是否一样,接下来就是判断两数组元素类型了,就是 function typeOf(){} 因为typeof主要用于原始类型(就是 number string Boolean null undefined ) 遇到对象类型只会返回 object,无法具体细分, 也就是说遇到 Date window array 等对象类型是都会返回 object 所以还要用 instanceof 来检测不同的对象类型 如:else if( ele instanceof ...
2017-12-19
js 数据类型
原始数据类型:
number string boolean null
undefined
对象数据类型(object): array function date
原始数据类型:
number string boolean null
undefined
对象数据类型(object): array function date
2017-12-16
LinkDetector.prototype = Object.create(DetectorBase.prototype); 不是Detector.prototype吧?
2017-12-14