Search
 
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
Name
4+3 =