1 | let i = 0; |
1 | let i = 0; |
1 | for (let i = 0; i < scores.length; i++) { |
1 | for (i in scores) { |
1 | for (score of scores) { |
forEach
map
reduce
reduceRight
flatMap
filter
every
some
indexOf
lastIndexOf
find
findIndex
keys
entries
includes
Spread …
via https://www.w3schools.com/js/js_array_iteration.asp
via https://www.w3schools.com/jsref/jsref_obj_array.asp
at
1 | const fruits = ["Banana", "Orange", "Apple", "Mango"]; |
array.slice(start, end)
The slice() method does not change the original array.
array.splice(index, howmany, item1, ….., itemX)
The splice() method overwrites the original array.
copyWithin
array.copyWithin(target, start, end)