Update article.md

str.lastIndexOf syntax incorrect
This commit is contained in:
Prasanna Shandilya 2018-11-15 20:15:37 +05:30 committed by GitHub
parent 991ca66d70
commit 65bd64307b
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)`"
There is also a similar method [str.lastIndexOf(pos)](mdn:js/String/lastIndexOf) that searches from the end of a string to its beginning.
```smart header="`str.lastIndexOf(substr, position)`"
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.
```