DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR JAVASCRIPT
js pick last element of array
const
array
=
[
a
,
b
,
c
,
d
]
let
last
=
array
[
array
.
length
-
1
]
console
.
log
(
last
)
// "d"
Source by www.codegrepper.com #
PREVIOUS
NEXT
Tagged:
#js
#pick
#element
#array
ADD COMMENT
Topic
COMMENT
Name
1+8 =
Submit