Array.prototype.findLastbeginnerconst nums = [5, 12, 8, 130, 44]
nums.findLast(n => n > 10) // β 44 (last match)Use findLast() to get the last element that satisfies a condition, searching from the end.
Array.prototype.findLast(callback) is the reverse of find() β it iterates from the end of the array and returns the last element for which the callback is truthy.
Challenge: Implement findLastEven(nums) that returns the last even number in the array.
findLastEven([1, 2, 3, 4, 5]) // β 4
findLastEven([1, 3, 5]) // β undefined