1.0.0 • Published 6 years ago

random-int-generator v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
6 years ago

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