return array[array.length - 1];
let arr = ['a', 'b', 'c'] arr.slice(-1)[0] // returns last element in an array