From 6ac63eb3b7b05ab8c644b605418d306c9d288339 Mon Sep 17 00:00:00 2001 From: Prajwal Poojary <68125622+prajwalpoojary@users.noreply.github.com> Date: Fri, 14 May 2021 18:19:08 +0530 Subject: [PATCH] update explanation for lastIndexOf() The Array.prototype.lastIndexOf() return the last index of the matched element in the array. --- 06_Arrays/01_Array Methods/07_Methods for Searching/00_.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/06_Arrays/01_Array Methods/07_Methods for Searching/00_.md b/06_Arrays/01_Array Methods/07_Methods for Searching/00_.md index 47db656..264f889 100755 --- a/06_Arrays/01_Array Methods/07_Methods for Searching/00_.md +++ b/06_Arrays/01_Array Methods/07_Methods for Searching/00_.md @@ -5,7 +5,7 @@ There are many methods that can help you find specific elements in an array. The - returns `-1` is the element is not found `arrayname.lastIndexOf(element, [leftOf])` - - returns the index of the first match in the array + - returns the index of the last match in the array - returns `-1` is the element is not found `arrayname.find(function)` @@ -14,4 +14,4 @@ There are many methods that can help you find specific elements in an array. The `arrayname.findIndex(function)` - returns the index of the leftmost element in the array, that meets the criteria in the function - - if no such element is found, returns `-1` \ No newline at end of file + - if no such element is found, returns `-1`