Added for
and for..of
... as ways to iterate over arrays
This commit is contained in:
parent
d9ee6e3c23
commit
dde3c1a00b
1 changed files with 1 additions and 1 deletions
|
@ -520,7 +520,7 @@ alert( str ); // Bilbo;Gandalf;Nazgul
|
|||
|
||||
### reduce/reduceRight
|
||||
|
||||
When we need to iterate over an array -- we can use `forEach`.
|
||||
When we need to iterate over an array -- we can use `forEach`, `for` or `for..of`.
|
||||
|
||||
When we need to iterate and return the data for each element -- we can use `map`.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue