random

.random()

Returns a random value from this array. If the array is empty, then null is returned.

names = [ :john, :peter, :mark, :alan ]

3.times() do
    // randomly prints out a name to the console
    console( names.random() )
end

See also

shuffle