js 数组的filter方法

偶然间在看别人的代码时看见了一个filter方法。此前没用过。记录一下.web 语法: array.filter(function(currentValue,index,arr), thisValue) currentValue: 当前元素 index:当前元素索引 arr:当前元素所属数组 thisValue:做为参数中的function中的this数组 实例: var ages = [32,
相关文章
相关标签/搜索