Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/freeCodeCamp/freeCodeCamp
/ randomBetween
Function
randomBetween
client/src/utils/random-between.ts:2–3 ·
view source on GitHub ↗
(x: number, y: number)
Source
from the content-addressed store, hash-verified
1
// returns a random number between x and y
2
export
const
randomBetween = (x: number, y: number): number =>
3
Math.floor(Math.random() * (y - x + 1)) + x;
Callers
1
shouldRequestDonationSelector
Function · 0.90
Calls
no outgoing calls
Tested by
no test coverage detected