ES學習筆記(五)——數組的循環和數組新增的東西

一. arr.forEach()   循環遍歷數組 作用:用於調用數組的每個元素,並將數組的每個元素傳給回調函數。 語法:array.forEach(function(currentValue. index, array), thisValue) currentValue: 當前元素 (必需)   index: 當前元素的索引值(可選) array:當前元素所說的數組對象     thisValu
相關文章
相關標籤/搜索