Skip to content

Instantly share code, notes, and snippets.

@seandaniel
Last active July 31, 2020 14:07
Show Gist options
  • Save seandaniel/14c4f65d934e4b9e60c6ba633d36623d to your computer and use it in GitHub Desktop.
Save seandaniel/14c4f65d934e4b9e60c6ba633d36623d to your computer and use it in GitHub Desktop.
How to use the includes() method
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