Array.prototype.findLastbeginnerconst arr = [1, 2, 3]
arr.findLast(n => n > 10) // β undefined (no match)findLast() returns undefined when no element satisfies the predicate.
Just like find(), findLast() returns undefined when no element satisfies the predicate.
Challenge: Implement findLastNegative(nums) that returns the last negative number, or undefined if none.
findLastNegative([1, -2, 3, -4]) // β -4
findLastNegative([1, 2, 3]) // β undefined