ashikov/frontend-project-lvl1

View on GitHub
src/utils.js

Summary

Maintainability
A
0 mins
Test Coverage
const getRandomInt = (minimumValue = 1, maximumValue = 100) => {
  const min = Math.ceil(minimumValue);
  const max = Math.floor(maximumValue);

  return Math.floor(Math.random() * (max - min + 1)) + min;
};

export default getRandomInt;