Learn
Drivers
Downloads
Community
Blog
OPTIONS
Version
Select Version
3.0 (current)
2.6
2.4
2.2
Formats
HTML
PDF
EPUB
Contribute
Report a Problem
Edit on Github
Reference
>
mongo
Shell Methods
>
Native Methods
>
rand()
rand()
¶
_rand
(
)
¶
Returns:
A random number between
0
and
1
.
This function provides functionality similar to the
Math.rand()
function from the standard library.
←
quit()
removeFile()
→
ON THIS PAGE
rand()
Report a Problem