DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR JAVASCRIPT
javascript append to array
arr = [1, 2, 3, 4] arr.push(5) // adds element to end arr.unshift(0) // adds element to beginning
Source by developer.mozilla.org #
PREVIOUS
NEXT
Tagged:
#javascript
#append
#array
ADD COMMENT
Topic
COMMENT
Name
5+4 =
Submit