In bracket notation negative indexing is not possible but using at method you can easily navigate to the last index of array. It's just another way to access elements.
Because if you’re doing a map/filter/reduce/etc you have to first store that in a temporary variable and then reference the temp var twice to get the last element.
28
u/HyerOneNA Oct 26 '21
Why use the at method when you can just use square bracket notation?