including-range-array
including-range-array is a simple module, which adds two new methods, namely range()
and random()
.
Usage
You start using this module by requiring it (as every other npm module), like so:
const range random =
range(max, min = 0)
method
The To use the range()
method, you use it in this way:
// => [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] // You can also specify a 'min' number // => [4, 5, 6, 7, 8, 9, 10]
random(max, min = 0)
method
The The random()
method returns a random number between the specified range.
To use it, instead, you do like this:
// => 6 // You can also specify a 'min' number // => 8