.sample()
Sample randomly selects one element from an array to return.
Syntax
return #fs.scripts.lib().sample(arr);
Parameters
arr
The array to be sampled.
Return
Returns the data type of the element sampled.
"banana"
Example
function(context, args) {
let arr = ["apple", "banana", "strawberry"];
return #fs.scripts.lib().sample(arr);
}