Programming Search⌘K

Random numbers

How programs make random values, and the traps of seeds, ranges and bias. The node generate-random-numbers moves here from primitive-types.

Tasks

  • Generate random numbers

    Get a random integer in a range with no modulo bias, shuffle a list, repeat a sequence with a seed, and make a token with a cryptographically secure generator.

    10 languagescore