js in array
The includes() method checks if an array, which is a list of items in Array, contains a certain value. It gives back true if the value is there, and false if it isn't.
const fruits = ['orange', 'apple', 'watermelon'];
console.log(fruits.includes('orange'));
// Expected output: true
console.log(fruits.includes('banana'));
// Expected output: false
- We are not pushy
- We only send a few emails every month. That's all.
- No spam
- We only send articles, and helpful tips for developers, not SPAM.