Please enable JavaScript to use CodeHS

CodeHS Glossary


Randomize JavaScript

CodeHS uses a built-in Randomizer method to generate random objects. For example, to generate a random number between 1 and 5: var randomNumber = Randomizer.nextInt(1, 5); Refer to the Cheat Sheet for more examples and use cases of Randomizer.