Tag Archives: random number

Emulate PHP’s Rand() Function in Javascript

Javascript’s random number generator is lacking a lot of power. To create a number between say 0 and 10, you can do this: number = Math.round(Math.random()*10); Of course you can modify this slightly to fit your needs, but this should … Continue reading

Posted in Javascript | Tagged , , | 2 Comments