How to check if a value exists in an array?
Aug 7, 2022 · 1 min read · An easy way to check if a value exists in an array, is to use the method indexOf(). The method indexOf() is applied to an array and takes as argument a value and it searches and returns the first index of the position, where the value is in the array...
Join discussion