Skip to content

Instantly share code, notes, and snippets.

@nairihar
Last active June 23, 2018 14:53
Show Gist options
  • Save nairihar/1edebf3872bf696194db428b9185048f to your computer and use it in GitHub Desktop.
Save nairihar/1edebf3872bf696194db428b9185048f to your computer and use it in GitHub Desktop.
JavaScript series, part 1, Set, medium
const mySet = new Set();
mySet.add('a');
mySet.add('b');
mySet.forEach((value, index, set) => {
console.log(value, index, set);
});
// 'a', 'a', mySet
// 'b', 'b', mySet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment