javascript search into string code example
Example 1: find in string javascript
stringToBeSearched.search(stringToBeFound);
Example 2: search inside a string javascript
var string = "Hello world!";
var n = string.search("w"); //now n equals 6
stringToBeSearched.search(stringToBeFound);
var string = "Hello world!";
var n = string.search("w"); //now n equals 6