js array last() code example
Example 1: javascript last element of an array
var colors = ["red","blue","green"];
var green = colors[colors.length - 1];//get last
Example 2: last element of array javascript
last element of array
var colors = ["red","blue","green"];
var green = colors[colors.length - 1];//get last
last element of array