Skip to content

Instantly share code, notes, and snippets.

@viswesh
Created September 11, 2017 02:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save viswesh/e55daa7616ab6b15e8c606f1148766b8 to your computer and use it in GitHub Desktop.
Save viswesh/e55daa7616ab6b15e8c606f1148766b8 to your computer and use it in GitHub Desktop.
ES6 Iterators sample
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