js 數組的filter方法

偶然間在看別人的代碼時看見了一個filter方法。此前沒用過。記錄一下.web 語法: array.filter(function(currentValue,index,arr), thisValue) currentValue: 當前元素 index:當前元素索引 arr:當前元素所屬數組 thisValue:做爲參數中的function中的this數組 實例: var ages = [32,
相關文章
相關標籤/搜索