Last active
July 31, 2020 14:07
-
-
Save seandaniel/14c4f65d934e4b9e60c6ba633d36623d to your computer and use it in GitHub Desktop.
How to use the includes() method
This file contains hidden or 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 ages = [6, 5, 8, 10]; | |
ages.includes(6) | |
// true | |
const fruit = ['Mango', 'Pineapple', 'Dragon Fruit']; | |
fruit.includes('Apple'); | |
// false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment