summaryrefslogtreecommitdiff
path: root/src/node_modules/chance/docs/person/age.md
blob: 4a51b7da94e163d6ebf534bb63f734c8627a26c3 (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
# age

```js
// usage
chance.age()
chance.age({ type: 'child' })
```

Generate a random age

```js
chance.age();
=> 45
```

Default range is between 1 and 120

Optionally specify one of a handful of enumerated age types:

```js
chance.age({type: 'child'});
=> 9
```

Allowed types are: `child`, `teen`, `adult`, `senior`