function getRandomNumber (min, max, fixed) {
var num = 0;
if (min > max) {
return ( -1 );
}
if (min == max) {
return ( min );
}
if (fixed !== 0)
num = parseFloat(min + (Math.random() * (max - min))).toFixed(fixed);
else
num = parseInt(min + (Math.random() * (max - min)));
return num;
}
console.log(getRandomNumber(1,60));
console.log(getRandomNumber(1,60));
console.log(getRandomNumber(1,60));
console.log(getRandomNumber(1,60));
console.log(getRandomNumber(1,60));
console.log(getRandomNumber(1,60));