Skip to content
CodeWiki
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
Search
⌘K
English
English
Chinese
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
English
English
Chinese
Practice
/
Quiz
/
JavaScript
/
Math object
Which expression maps Math.random() to an integer in the closed interval [minimum, maximu…
from Math object
Node 24
beginner
1 min
Which expression maps Math.random() to an integer in the closed interval [minimum, maximum] when both bounds are valid integers?
minimum + Math.floor(Math.random() * (maximum - minimum + 1))
minimum + Math.round(Math.random() * (maximum - minimum))
Math.floor(Math.random() * maximum) + minimum
minimum + Math.ceil(Math.random() * (maximum - minimum + 1))
Check
Ask AI about this kata
Report an error
previous kata
What does Number.EPSILON represent?
Quiz
next kata
What does this program print?
Predict the output
A new version is available
Reload