array at Array.at(-1) returns the last element without .length calculation. const last = arr.at(-1) Learned on 2025-05-07