Answers for "why last index of array is n-1"

34

last index array javascript

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

Code answers related to "why last index of array is n-1"

Code answers related to "Javascript"

Browse Popular Code Answers by Language