blob: 9f3ed808245cb33814e5ebba13b8104fb3cf6861 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# letter
```js
// usage
chance.letter()
chance.letter({ casing: 'lower' })
```
Return a random letter.
```js
chance.letter();
=> 'p'
```
By default it will return a random lowercase letter.
<p class="pullquote">Note, wanted to call this option just <strong>case</strong> instead of <strong>casing</strong> but unfortunately that's a reserved word in JavaScript for use in a switch statement</p>
It's possible to specify upper case
```js
chance.letter({casing: 'upper'});
=> 'A'
```
|