Skip to content

Instantly share code, notes, and snippets.

@giltayar
Created January 24, 2017 08:12
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 giltayar/5f7e4a7f1d68ff646fd715980ac023e8 to your computer and use it in GitHub Desktop.
Save giltayar/5f7e4a7f1d68ff646fd715980ac023e8 to your computer and use it in GitHub Desktop.
const str = 'H😀😀d';
const iterator = str[Symbol.iterator](); // get the iterator from string
iterator.next(); // skip over the 'H'
console.log(iterator.next().value); // get the first emoji
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment