Answers for "js find last index value"

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
0

last position of array javascript

arr.slice(-1).pop()
Posted by: Guest on November-05-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language