Skip to Content
🎲 欢迎使用 RandBox - 功能强大的 JavaScript 随机数据生成库! 了解详情

age

// 用法 randBox.age() randBox.age({ type: 'child' })

生成一个随机年龄

randBox.age(); => 45

默认范围是 1 到 120 之间

可选择指定几种枚举的年龄类型之一:

randBox.age({type: 'child'}); => 9

允许的类型有:childteenadultsenior

最后更新于: