how to target the last elements of an array code example
Example: javascript last element of an array
var colors = ["red","blue","green"];
var green = colors[colors.length - 1];//get last
var colors = ["red","blue","green"];
var green = colors[colors.length - 1];//get last