Includes-Method

Includes Method in JavaScript

Source

The includes() method is a boolean returning true if the passed in value is among the entries in an array. False if not.

Example

const arr1 = [1,2,3]

console.log(arr1.includes(2))
// Expected output: true

console.log(arr1.includes(5))
// Expected output: false

#JavaScript