Skip to content

natanr123/okrand

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This package gives a utility function for getting a random integer in range. Also added shuffle to shuffle an Array

Example of use:

console.log(randomIntRange(0,0));
// result is 0

console.log(randomIntRange(0,1));
// result is 0 or 1

console.log(randomIntRange(2,2));
// result is 2

console.log(randomIntRange(3,7));
// result can be of of the values 3,4,5,6,7

console.log(shuffle([1,2]));
// result is [1,2] or [2,1]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published