Stop using .reverse().find(): meet findLast()
If you’ve ever needed to search an array from the end, you’ve probably reached for a combination of .slice().reverse().find(...), or looped backward manually. It works, but it’s not an elegant solution. We now have a better way: Array.prototype.findLast() and Array.prototype.findLastIndex(). These features let you search arrays from the end without...