Answers for "typescript check every element in array"

9

typescript check if element in array

your_array.includes(the_element)
Posted by: Guest on March-25-2020
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 "typescript check every element in array"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language