Skip to content

generatePassword

generatePassword([length]) ⇒ string

Generates a random password of the specified length.

Kind: global function
Returns: string - The generated password.

ParamTypeDefaultDescription
[length]number10The length of the password to generate.

Example

console.log(generatePassword(10))