Jump to content

JavaScript String lastIndexOf start Parameter Description


Guest -doug

Recommended Posts

Guest -doug

The description of the start parameter of the lastIndexOf method on the page, http://www.w3schools.com/jsref/jsref_lastindexof.asp, is incorrect. It says, "If omitted, the search starts from position 0." It should say something like, "If omitted, the search starts at the end of the string."It might also be helpful to note that the search from start is in reverse. So, "Bogus Dude!".lastIndexOf("u", 5) = 3 not 7.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...