js get last value in no index array code example
Example 1: get last element of array javascript
var numbers = ["one", "two", "three"];
var lastnumber = numbers[numbers.length - 1];
console.log(lastnumber);
Example 2: how to select last element in a array
int[] karunakar={1,2,3};
System.out.println(karunakar[karunakar.length-1]);