Elementary | Middle
Middle | High
AI
Use Cases
Teaching
Tools
Explore our languages
Start a new project
Open a blank sandbox in any language.
Company
Community
Explore
Click on one of our programs below to get started coding in the sandbox!
View All
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.