Skip to Content
🎲 Welcome to RandBox - Powerful JavaScript Random Data Generation Library! Learn More

letter

// usage randBox.letter() randBox.letter({ casing: 'lower' })

Return a random letter.

randBox.letter(); => 'p'

By default it will return a random lowercase letter.

Note, wanted to call this option just case instead of casing but unfortunately that’s a reserved word in JavaScript for use in a switch statement

It’s possible to specify upper case

randBox.letter({casing: 'upper'}); => 'A'