1
0
mirror of https://github.com/jbranchaud/til synced 2026-01-03 07:08:01 +00:00
Files
til/javascript/random-cannot-be-seeded.md
2016-02-01 22:25:23 -06:00

458 B

Random Cannot Be Seeded

In JavaScript, you can use Math.random() to get a sorta random value.

> Math.random()
0.5130641541909426

Most programming languages give you a method of seeding the random number generator for determinism. Unfortunately, JavaScript provides no way for choosing or resetting the seed to Math.random().

source