Merge pull request #623 from ShandilyaPrasanna/patch-2

Update article.md
This commit is contained in:
Ilya Kantor 2018-11-18 23:36:42 +03:00 committed by GitHub
commit 97528aa231
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -275,8 +275,8 @@ while ((pos = str.indexOf(target, pos + 1)) != -1) {
*/!* */!*
``` ```
```smart header="`str.lastIndexOf(pos)`" ```smart header="`str.lastIndexOf(substr, position)`"
There is also a similar method [str.lastIndexOf(pos)](mdn:js/String/lastIndexOf) that searches from the end of a string to its beginning. There is also a similar method [str.lastIndexOf(substr, position)](mdn:js/String/lastIndexOf) that searches from the end of a string to its beginning.
It would list the occurrences in the reverse order. It would list the occurrences in the reverse order.
``` ```