Mwnci shuffle() Function

Syntax

shuffle(array)

Description

The shuffle() function returns a new array with all the elements in a random order.

Example

a=["Apples", "Bananas", "Oranges", "Pears"]
b=shuffle(a)
println("a=", a)
println("b=", b)
c=[1,2,3,4,5,6,7,8,9,10]
println(shuffle(c))


a=["Apples", "Bananas", "Oranges", "Pears"]
b=["Bananas", "Oranges", "Pears", "Apples"]
[10, 6, 1, 9, 8, 3, 2, 7, 5, 4]