Ask coding questions

← Back to all posts
How to make something random
seth08g (1)

How do I make it so where the computer randomly picks a choice. I need it for what I am making. Please help, thanks

Answered by codingjlu (484) [earned 5 cycles]
View Answer
Comments
hotnewtop
codingjlu (484)

Math.floor(Math.random() * 11) returns a random number from 0-10 (a number under 11)