przykłady z: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/random, http://colintoh.com/blog/lodash-10-javascript-utility-functions-stop-rewriting
// @return [float] a random number between min and max
function getRandom(min, max) {
return Math.random() * (max - min) + min;
}
// @return [integer] a random int between min and max
function getRandomInt(min, max) {
return Math.floor(Math.random() * (max - min)) + min;
}
// simpler
Math.floor(Math.random()*max);
// Lodash
_.random(15, 20);