I hereby decree

by David LeMieux

 

Getting a random value in JavaScript is pretty boring;

 var random = Math.random(); 


This will give you a floating-point, psuedo-random number between zero and one. This is not very random. When I ask for something random I should be able to get back whatever. Spork. Waffles. Things that are totally random and cool.

That is why I've taken the first step toward making Math.random more random.



As you can see, this updates the regular Math.random to also sometimes return a totally random string (cheese). (This is another example of how random it should be.)

DOOM!

 

blog comments powered by Disqus