Created
September 11, 2017 02:09
-
-
Save viswesh/e55daa7616ab6b15e8c606f1148766b8 to your computer and use it in GitHub Desktop.
ES6 Iterators sample
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
let s = “Hello”; | |
let sIterator = s[Symbol.iterator](); | |
console.info( sIterator.next().value ) //H | |
console.info( sIterator.next().value ) //e | |
console.info( sIterator.next().value ) //l |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment