how to read the last part of an array first js code example
Example: javascript get last element of array
var array = [1,2,3,4,5,6];
var val = array[array.length - 1]; // 6
var array = [1,2,3,4,5,6];
var val = array[array.length - 1]; // 6