DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR JAVASCRIPT
javascript grab only even array index
for(var i = 0; i < a.length; i += 2) { // take every second element ar.push(a[i]); }
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#javascript
#grab
#array
#index
ADD COMMENT
Topic
COMMENT
Name
9+1 =
Submit