function
ShuffleList(tempList)
var newList = []
while(tempList.length > 0)
var item = Util.pick(tempList)
tempList.splice(tempList.indexOf(item), 1)
newList.push(item)
return newList
Usage: testList1 = ShuffleList(testList1)
Result: testList1 will have all of its contents put in a random order.
Usage: testList1 = ShuffleList(testList2)
Result: testList1 will have all of testList2's contents put in a random order.
Usage: testList1 = ShuffleList(testList2.slice(5, 10))
Result: testList1 will have items #5 through #10 in testList2 put in a random order.
function ShuffleList(tempList) var newList = [] while(tempList.length > 0) var item = Util.pick(tempList) tempList.splice(tempList.indexOf(item), 1) newList.push(item) return newList
Usage: testList1 = ShuffleList(testList1)
Result: testList1 will have all of its contents put in a random order.
Usage: testList1 = ShuffleList(testList2)
Result: testList1 will have all of testList2's contents put in a random order.
Usage: testList1 = ShuffleList(testList2.slice(5, 10))
Result: testList1 will have items #5 through #10 in testList2 put in a random order.