Dapatkan indeks array objek terakhir JavaScript

lastIndex = myArray.length - 1;
Different Dolphin