+ 1
Random Generator
I want to build a random generator for a role playing game to cut down on the amount of dice rolls necessary. I want it to be web-based so others can use it. Obviously, I will need html and css for style, but should I focus on learning JavaScript or is there another language that would be more appropriate to create the generator code?
3 Antworten
+ 2
Hi Chris
You only need a very simple Javascript function like this
function randomRange(min, max) {
return (Math.random() * (max - min)) + min;
}
and call it like this
var diceRoll=randomRange(10,100);
+ 1
You have to learn javascript for any sort of web development. So you can start with learning Javascript without any worries.
+ 1
Thank you both!