Docs 菜单
Docs 主页
/ /
旧版 shell 中的原生方法

_rand()

注意

此处列出的原生方法适用于旧版 mongo shell 。

要使用mongosh 中的原生方法,请参阅 mongosh中的原生方法。

_rand()
返回:01之间的随机数。

此函数提供与标准库中的Math.rand()函数类似的功能。

后退

_isWindows()