rand5() javascript code example Example: random js function randomNumber(min, max) { return Math.floor(Math.random() * (max - min)) + min + 1; }