Skip to content
Nate
Stephens

Random Integer - Inclusive

Result is inclusive of both the min and max arguments.

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

Last Updated: