From 65bd64307b0fd00b546c606d3d7ddb92558ad600 Mon Sep 17 00:00:00 2001 From: Prasanna Shandilya Date: Thu, 15 Nov 2018 20:15:37 +0530 Subject: [PATCH] Update article.md str.lastIndexOf syntax incorrect --- 1-js/05-data-types/03-string/article.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/1-js/05-data-types/03-string/article.md b/1-js/05-data-types/03-string/article.md index b3e3029a..b8a8ac73 100644 --- a/1-js/05-data-types/03-string/article.md +++ b/1-js/05-data-types/03-string/article.md @@ -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. ```