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'
Last updated on: