Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update explanation for lastIndexOf() #39

Merged
merged 1 commit into from
May 14, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions 06_Arrays/01_Array Methods/07_Methods for Searching/00_.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)`
Expand All @@ -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`
- if no such element is found, returns `-1`