Skip to content

Instantly share code, notes, and snippets.

@gpalsingh
Last active April 25, 2018 14:00
Show Gist options
  • Save gpalsingh/51740f986f0c32a8ea77fb2c4758589e to your computer and use it in GitHub Desktop.
Save gpalsingh/51740f986f0c32a8ea77fb2c4758589e to your computer and use it in GitHub Desktop.
set_has
const animals = new Set(["rat", "dog", "cat", "horse", "elephant", "rat", "rat", "cat"]);
console.log(animals.has("rat"));
console.log(animals.has("elephant"));
console.log(animals.has("table"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment