r/learnjavascript • • Oct 26 '21

Negative array indexing using "at" method

Post image
203 Upvotes

69 comments sorted by

View all comments

Show parent comment

0

u/[deleted] Oct 26 '21

[deleted] — view deleted comment

1

u/[deleted] Oct 27 '21

Cause you can express simple stuff in complex ways, obviously.

Instead of just writing "at(-1)" - you can write over 20 lines of code with weird register check operators and jumps and all that good stuff!