I am using includes
to know if the element exists in my array:
var array = [1,2,3,4,5]
array.includes(1)
Console => true
All very well, but now I try to put more options to the functionincludes
How to verify that there is at least one element out of several in the array?
var array = [1,2,3,4,5]
array.includes(0,2,3,8)
As we can see the 2 and 3 exist in our array, but if I run this I get false
.
array.includes(0,2,3,8)
Console => false