DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR RUBY
ruby array randomly display
arr = [1, 2, 3, 4] arr.sample # => 3 pick random number arr.shuffle # => [3, 1, 4, 2]
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#ruby
#array
#randomly
#display
ADD COMMENT
Topic
COMMENT
Name
4+3 =
Submit