Skip to main content

randomKey

Generates a random string of a specified length using alphanumeric characters.

Parameters

ParameterTypeOptionalDefaultDescription
lengthnumberfalseThe length of the random string to generate.

Returns

number

Example

randomKey(6); // "E61jC0"