fix(curriculum): corrected formula for generating a random number (#64231)
Some checks failed
i18n - Build Validation / Validate i18n Builds (22) (push) Has been cancelled
CI - Node.js / Lint (22) (push) Has been cancelled
CI - Node.js / Build (22) (push) Has been cancelled
CI - Node.js / Test (22) (push) Has been cancelled
CI - Node.js / Test - Upcoming Changes (22) (push) Has been cancelled
CI - Node.js / Test - i18n (italian, 22) (push) Has been cancelled
CI - Node.js / Test - i18n (portuguese, 22) (push) Has been cancelled
CD - Docker - DOCR Cleanup Container Images / Delete Old Images (learn-api, dev) (push) Has been cancelled
CD - Docker - DOCR Cleanup Container Images / Delete Old Images (learn-api, org) (push) Has been cancelled
i18n - Download Client UI / Client (push) Has been cancelled

This commit is contained in:
Brian Tripp 2025-11-30 17:08:15 -06:00 committed by GitHub
parent dc13404330
commit 26e0752538
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -79,7 +79,7 @@ So, if the decimal point is less than `5`, the number is rounded down. And if th
```js
const max = 10;
const min = 5;
const randomNum = Math.floor(Math.random() * (max - min)) + min;
const randomNum = Math.floor(Math.random() * (max - min + 1)) + min;
console.log(randomNum);
```