how to search a word in a string in javascript code example
Example: search inside a string javascript
var string = "Hello world!";
var n = string.search("w"); //now n equals 6
var string = "Hello world!";
var n = string.search("w"); //now n equals 6