Skip to content

Instantly share code, notes, and snippets.

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