Skip to content

Commit ebd4934

Browse files
committed
# generate random function
1 parent eb962ea commit ebd4934

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

note.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3369,3 +3369,13 @@ const number = 2020202 / 10 | 0;
33693369
```
33703370
33713371
---
3372+
3373+
## 121. Generate Random whole numbers [Stackoverflow](https://stackoverflow.com/questions/1527803/generating-random-whole-numbers-in-javascript-in-a-specific-range)
3374+
3375+
```js
3376+
function randomBetween(min, max) {
3377+
return Math.floor(Math.random() * (max - min + 1)) + min;
3378+
}
3379+
```
3380+
3381+
---

0 commit comments

Comments
 (0)