Skip to content

Instantly share code, notes, and snippets.

@nairihar
Created June 22, 2018 13:13
Show Gist options
  • Save nairihar/32812d7ece80203ac1a8bb84db7c237f to your computer and use it in GitHub Desktop.
Save nairihar/32812d7ece80203ac1a8bb84db7c237f 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(2);
console.log(mySet.has(5));
// false
console.log(mySet.has(1));
// true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment