Test values of an array
Javascript arrays have a function called some
that can be used to determine if at least one element of an array passes a test:
console.log(["1", "2", "3"].some(n => n === 1))
=> false
Tweet
Javascript arrays have a function called some
that can be used to determine if at least one element of an array passes a test:
console.log(["1", "2", "3"].some(n => n === 1))
=> false
Tweet