Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
dragon731012
GitHub Repository: dragon731012/-WORKING-bookmarklets-and-games
Path: blob/main/other/random num.js
15563 views
1
javascript:
2
alert("by dragonmaster73101-dragonmaster731012 on github");
3
l=prompt("what do you want the max to be? ex: 1-6 max:6");
4
m=prompt("what do you want the min to be? ex: 1-6 min=1");
5
function getRandomNumberBetween(min,max){ return Math.floor(Math.random()*(max-min+1)+min); };
6
a=getRandomNumberBetween(m,l);alert("your random number is "+a+".")
7
8