JavaScript How to check if string contains substring in JavaScriptBy RahulNovember 28, 2014The JavaScript indexOf() method search for the substring in string and returns the position of the first occurrence of a…