Answers for "how to identify last 10 index of an array in javascript"

34

javascript last index

var colors = ["red","blue","green"];
var green = colors[colors.length - 1]; //get last item in the array
Posted by: Guest on July-25-2019
2

typescript last index of array

var items: String[] = ["tom", "jeff", "sam"];

alert(items[items.length-1])
Posted by: Guest on November-10-2020

Code answers related to "how to identify last 10 index of an array in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language