indexOf() The Array#indexOf() function is a common alternative to includes() . The indexOf() function returns the first index in the array at which it found valueToFind , or -1 otherwise.
Read moreCan I use includes JavaScript?
includes() method is intentionally generic. It does not require this value to be an Array object, so it can be applied to other kinds of objects (e.g. array-like objects).
Read moreAre Includes case sensitive?
Both String#includes() and String#indexOf() are case sensitive . Neither function supports regular expressions. To do case insensitive search, you can use regular expressions and the String#match() function, or you can convert both the string and substring to lower case using the String#toLowerCase() function.
Read moreIs includes JavaScript case sensitive?
Note: The includes() method is case sensitive i.e, it will treat the Uppercase characters and Lowercase characters differently.
Read moreHow do you use Lodash lowercase?
Lodash – lowerCase method
Read moreHow do I make a search not case-sensitive in JavaScript?
To do case insensitive search, you can use regular expressions and the String#match() function , or you can convert both the string and substring to lower case using the String#toLowerCase() function.16 May 2019
Read moreHow do you check if a string contains a particular substring in JavaScript?
The includes() method returns true if a string contains a specified string. Otherwise it returns false . The includes() method is case sensitive.
Read more