Random Digit Number Generator
How This Converter Works
Builds a requested-length digit string by independently choosing digits 0-9 with Math.random; leading zeroes are allowed.
Formula or rule
Repeat count times: append floor(Math.random() * 10).
Example
- Input
- Digit number: 4
- Calculation
- Four random selections are concatenated; each selection can be any digit, including zero.
- Result
- 0831 (one possible result)