Answers for "check every value in array javascript"

0

check every value in array javascript

["foo", "foo", "foo"].every((item, index) => item === "foo") // returns true since every item matches our condition
["foo", "bar", "foo"].every((item, index) => item === "foo") // return false because not all items match our condtion
Posted by: Guest on August-20-2021

Code answers related to "check every value in array javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language