Last active
April 25, 2018 14:00
-
-
Save gpalsingh/51740f986f0c32a8ea77fb2c4758589e to your computer and use it in GitHub Desktop.
set_has
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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