← TechnologyThe essentials of

findLast(): last match in array

Publisher: ResumeMaker • 1 source

Published: 22 Oct 2026 13:13 · Updated: 22 Oct 2026 13:13

AI source check: 21 Oct 2026 12:40. This is not editorial approval.

In a few sentences

In brief

The search starts at the end and returns the value, not the index.

Useful to know

findLast() traverses the array backwards and returns the first appropriate element in that direction. In [3, 8, 5, 12].findLast(x => x < 10), the result is 5. If nothing matches the condition, returns undefined. [1]

A suitable example is the last record with a certain state in an already arranged list. The method itself does not sort by date. If the array does not follow a chronological order, "last in the array" does not automatically mean "newest in time".

Sources

For further detail and to check the information:

  1. [1] MDN — Array.findLast ↗