How to Check If a String Contains a Sub String in JavaScript
In this short tip post, we will learn how to check if a string contains a substring using JavaScript. Objective We need to check whether the given word is present in the string as a substring. Approach We can use JavaScript indexOf() method to achieve the same. We can also use ES6 includes() method. Code […]
How to Check If a String Contains a Sub String in JavaScript Read More »