findLast < Array < JavaScript
The findLast() method of an array iterates the array in reverse order and returns the value of the first no that is true in the provided function. If no element satisfies the function, it returns undefined.
const numbers = [1, 2, 3, 4, 5];
const last = numbers.findLast((el) => el > 3);
console.log(last);
// 5