random-int-generator
v1.0.0
Published
Creates a random number.
Downloads
3
Readme
Random Number Generator
Creates a random number. You specify the length of the number.
Installation
npm install random-int-generator
Usage
Create a global variable.
const num = require('random-int-generator');
You specify the length of the number as parameter. This example will give you a 5 digit number.
let randomNumber = num.getRandomNumber(5);
console.log(randomNumber);
Output: The output is a random number, everytime you invoke the funktion the number will be different. In this example we specified a 5 digit number. If we want for example a 3 digit number, we call the function with the parameter 3.
83151