DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
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
COMMENT
Name
8+3 =
Submit