Dice adding kind gane | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Dice adding kind gane

Can anyone pls help me I am trying to find out how can I make one dice and just keep adding no. till I press a button

12th Jul 2019, 12:06 PM
Pranav mundhra
Pranav mundhra - avatar
1 Answer
0
You can add a dice with: var min = 1; var max = 6; //you can change that value if you want a dice with more numbers. var dice = Math.floor(Math.random()*(max-min))+min; but the rest of your question i cant understand unfortunately Try something with onmousedown="myfunction()" //fires as long as you click function myfunction(){ //thats what you wanna "add" }
17th Jul 2019, 10:01 AM
Leon