← You copy and reverse the array to find the last match. `findLast()` searches from the end directly.Quiz
findLast() and findLastIndex(): searching from the end
The classic workaround — spread, reverse, then find — copies the whole array and reports an index that belongs to that copy, not yours. ES2023's findLast() and findLastIndex() search backward directly and return the real element or the real index, no copy required.
questions6
pass mark70%
resultsat the end
No account needed. Answer all 6 questions, then see your score with every answer explained and a reference to the spec or MDN — pass and you can claim a certificate.