Skip to content

Instantly share code, notes, and snippets.

@nairihar
Created June 22, 2018 13:09
Show Gist options
  • Save nairihar/5d2e31a3d8c338ae9c02ab3853c38f80 to your computer and use it in GitHub Desktop.
Save nairihar/5d2e31a3d8c338ae9c02ab3853c38f80 to your computer and use it in GitHub Desktop.
JavaScript series, part 1, Set, medium
const mySet = new Set();
mySet.add(1);
mySet.add(2);
mySet.add(3);
mySet.clear();
mySet.add(4);
console.log(...mySet);
// 4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment