find last position of character in string javascript code example Example: lastindexof js string.lastIndexOf("subString")