.randomOf()

Description

RandomOf is a method that returns a random value from an array

Parameters

RandomOf takes no parameters.

Usage On Arrays

arr = ["wow","hello","world"]
// setup the array

log arr.randomOf()
// returns any item from the array

Last updated

Was this helpful?