JavaScript Tip: Is Random Really Random?

As random as random can be.

A computer cannot generate a truly random number because computation is deterministic: it follows an unbroken chain of cause and effect in which no truly random events ever occur. Instead, it uses a set of complex algorithms to generate what’s known as a pseudorandom number — a number that gives the appearance of randomness, and is good enough for any practical purpose.

This produces a number between zero and one (excluding either limit). Continue reading