String Function lastIndexOf()
Method or Function: lastIndexof(String)
Syntax:String. indexof(String)
lastIndexof function takes a character or string as an argument and finds the position of a character or word in a string and returns the last occurrence position of the string.
Example
<script type="text/javascript">
var string="hello everybody, my name is Aspell";
document.write(string.lastIndexOf("e"));
</script>
var string="hello everybody, my name is Aspell";
document.write(string.lastIndexOf("e"));
</script>
No comments:
Post a Comment