Último elemento de Array JavaScript
var my_array = /* some array here */;
var last_element = my_array[my_array.length - 1];
Misty Moose
var my_array = /* some array here */;
var last_element = my_array[my_array.length - 1];
// Find the last item in an array.
arrayName[arrayName.length - 1]
let list = ["item1", "item2", "item3", "etc"];
let last = list.reverse()[0]
// or
let last = list[list.length - 1]
// or
let last = list.slice(-1)