Ad
  • Custom User Avatar

    The first iteration will compare the first element and undefined.
    iterable[-1] does not wrap around but will return undefined as there is no index -1.
    iterable.at(-1) is required to wrap around and get the last element of an array.