Its kinda weird that the JavaScript Array class does not offer a last method to retrieve the last element of an array. I know the solution is simple (Ar[Ar.length-1] ), but, still, this is too frequently used.
Any serious reasons why this is not incorporated yet?
Because Javascript changes very slowly. And that’s because people upgrade browsers slowly.
Many Javascript libraries implement their own
last()function. Use one!