index starting from right

Asked

Viewed 110 times

6

Problem

I wish when I did "asdhusaidhi asdhasuidhu".indexOf('s') he would return to me 17 concerning the latter s of the string, for example, it start searching from the right..

but instead, he returned to me 1 concerning the first s found

Question?

How can I get him to start looking right?

  • 2

    forehead . lastIndexOf()

2 answers

8


8

Browser other questions tagged

You are not signed in. Login or sign up in order to post.