Created
June 14, 2018 08:40
-
-
Save ferreiratiago/b3a15720147573198d5cf943beea89e4 to your computer and use it in GitHub Desktop.
for...of example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var iterable = { | |
[Symbol.iterator]: myGenerator | |
}; | |
for (let item of iterable) { | |
console.log(item); | |
// 1 2 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment