How to check whether a string contains a substring in JavaScript?

How to check whether a string contains a substring in JavaScript?