Blog21.4K views2,661 votes0 replies756 following
Use Array.prototype.at() for cleaner relative index access in JavaScript
Replace arr[arr.length - 1] with arr.at(-1) for readable negative index access in modern JavaScript.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Replace arr[arr.length - 1] with arr.at(-1) for readable negative index access in modern JavaScript.