Skip to content

Latest commit

 

History

History
14 lines (9 loc) · 282 Bytes

File metadata and controls

14 lines (9 loc) · 282 Bytes

getRandomNumber()

Overview

Generates a pseudo random number within a given range.

Code

A screenshot of the titular code snippet

const getRandomNumber = (min, max) =>
  Math.floor(Math.random() * (max - min + 1)) + min;