DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR JAVASCRIPT
javascript select first n elements from array
const array = ['toto','tata','titi','tutu']; array.slice(0, 2); // => ['toto','tata']
PREVIOUS
NEXT
Tagged:
#javascript
#select
#elements
#array
ADD COMMENT
Topic
COMMENT
Name
5+9 =
Submit