Skip to content

Instantly share code, notes, and snippets.

@tomi
Created March 22, 2019 08:43
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 tomi/b2cb2d70aa26e60f1fe9ec75459c4490 to your computer and use it in GitHub Desktop.
Save tomi/b2cb2d70aa26e60f1fe9ec75459c4490 to your computer and use it in GitHub Desktop.
var someArray = [1, 2];
var iterator = someArray[Symbol.iterator]();
iterator.next(); // { value: 1, done: false }
iterator.next(); // { value: 2, done: false }
iterator.next(); // { value: undefined, done: true }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment