Created
January 6, 2014 13:24
-
-
Save unknownuser88/8282836 to your computer and use it in GitHub Desktop.
lastIndexOf(substr, [start]) Searches and (if found) returns the index number of the searched character or substring within the string. Searches the string from end to beginning. If not found, -1 is returned. “Start” is an optional argument specifying the position within string to begin the search. Default is string.length-1.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//lastIndexOf(substr, [start]) | |
var myString = 'javascript rox'; | |
console.log(myString.lastIndexOf('r')); | |
//output: 11 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment