DEV Community

Discussion on: `at` coming soon to ECMAScript

Collapse
 
hasnaindev profile image
Muhammad Hasnain • Edited

Everybody gangsta until .at(-1) returns undefined.

Collapse
 
jankapunkt profile image
Jan Küster

Would [].at(-1) be like dividing by zero?

 
raulcg profile image
RaulC-G

[].at(-1) == [][[].length - 1] == [][-1] == undefined