Skip to main content

.create_rand_string()

A function that generates a string of random lowercase alphanumeric characters.

Syntax

#fs.scripts.lib().create_rand_string(count, rand);

Parameters

count

The number of characters that the random string should contain.

rand (optional)

A random number generator function. Defaults to Math.random.

Return

Returns a string.

Example

function(context, args) {
const l = #fs.scripts.lib();

return l.create_rand_string(7);
}