diff options
author | hra <hamid.alipour@live.com> | 2018-07-01 15:10:13 -0700 |
---|---|---|
committer | hra <hamid.alipour@live.com> | 2018-07-01 15:10:13 -0700 |
commit | 2a3d19ef73cf273e5ab0b0a6d640172b47b6bb92 (patch) | |
tree | bf357936bcebd6f5b62112c633764075305019de | |
parent | faca0e79445f90e51acc4c4345795de6ae69c9ab (diff) |
add for/of to js (change description)
-rw-r--r-- | javascript.html.markdown | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/javascript.html.markdown b/javascript.html.markdown index f2dd08c8..35bcf988 100644 --- a/javascript.html.markdown +++ b/javascript.html.markdown @@ -248,7 +248,9 @@ for (var x in person){ description += person[x] + " "; } // description = 'Paul Ken 18 ' -// The for/of statement allows iteration over an iterator. +// The for/of statement allows iteration over iterable objects (including the built-in String, +// Array, e.g. the Array-like arguments or NodeList objects, TypedArray, Map and Set, +// and user-defined iterables). var myPets = ""; var pets = ["cat", "dog", "hamster", "hedgehog"]; for (var pet of pets){ |