DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR RUBY
ruby select first n elements from array
array = ['toto','titi','tata','tutu'] array.first(2) # => ['toto', 'titi']
PREVIOUS
NEXT
Tagged:
#ruby
#select
#elements
#array
ADD COMMENT
Topic
COMMENT
Name
8+3 =
Submit