2018年1月10日

js some和filter用法和区别

摘要: some方法 array1.some(callbackfn[, thisArg]) 对数组array1中的每个元素调用回调函数callbackfn,当回调函数返回true或者遍历完所有数组后,some方法终止。可选参数thisArg可以替换回调函数中的this对象 filter方法 array1.f 阅读全文

posted @ 2018-01-10 11:15 程序猿-alvin 阅读(640) 评论(0) 推荐(0) 编辑

导航