Skip to content

generateCaptcha

generateCaptcha([captchaLength]) ⇒ String

Generates a random captcha string with the specified length.

Kind: global function
Returns: String - The generated captcha string.

ParamTypeDefaultDescription
[captchaLength]number5The length of the captcha string to generate (defaults to 5).

Example

console.log(generateCaptcha(number))