DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR JAVASCRIPT
es6 get first and last element of array
let {0 : a ,length : l, [l - 1] : b} = [1,2,3,4,5,6,7,8,9,0]; console.log(a, b)
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#element
#array
ADD COMMENT
Topic
COMMENT
Name
9+8 =
Submit