Added for and for..of

... as ways to iterate over arrays
This commit is contained in:
Mojtaba Javan 2018-12-27 06:34:52 +03:30 committed by GitHub
parent d9ee6e3c23
commit dde3c1a00b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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`.