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++) { if(i % 2 === 0) { // index is even ar.push(a[i]); } }
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#javascript
#grab
#array
#index
ADD COMMENT
Topic
COMMENT
Name
3+7 =
Submit