Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript last element of an array

var colors = ["red","blue","green"];
var green = colors[colors.length - 1];//get last
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #element #array
ADD COMMENT
Topic
Name
1+3 =