Knowledge Walls
Laya
Hyderabad, Andhra Pradesh, India
String.prototype.lastIndexOf() Method in String Class of Javascript Syntax with Examples
1481 Views
Usage 
lastIndexOf() return the last occurence position of element in the elements.
Syntax 
String.lastIndexof("element")
Example
var userName = "Steve smith";

//Returns the last occurence the position of the element
var char1 = userName.lastIndexOf("t");
document.write("The element position is "+char1+" in the string.");
Output 
The element position is 9 in the string.
Best Lessons of "Javascript Syntax with Examples"
Top lessons which are viewed more times.
  Copyright © 2014 Knowledge walls, All rights reserved
KnowledgeWalls
keep your tutorials and learnings with KnowledgeWalls. Don't lose your learnings hereafter. Save and revise it whenever required.
Click here for more details