Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

find in javascript

str.indexOf("locate"); // return location of first find value
str.lastIndexOf("locate"); // return location of last find value
str.indexOf("locate", 15); // start search from location 15 and then take first find value
str.search("locate");
//The search() method cannot take a second start position argument. 
//The indexOf() method cannot take powerful search values (regular expressions).
Source by github.com #
 
PREVIOUS NEXT
Tagged: #find #javascript
ADD COMMENT
Topic
Name
4+1 =