But, it does have an indexOf() function that might just do the trick
All you need to do is check whether the return value is -1 or not. A return value of -1 implies that the specific letter is not present in the given data.
A simple example below will make things clear:
var a = “hello”;
The output is as follows:
2 // which implies that the letter ‘l’ is present in position 2.
-1 //which implies that the number 0 is not present.