Files
SupportBot/node_modules/chance/docs/person/age.md
T
2021-02-02 13:50:53 +00:00

26 lines
321 B
Markdown

# 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`