Aresla/project-lvl1-s508

View on GitHub
src/helpers/getRandomInteger.js

Summary

Maintainability
A
0 mins
Test Coverage
const getRandomInteger = (from, to) => {
  const notRoundedRandom = (Math.random() * (to - from)) + from;
  return Math.floor(notRoundedRandom);
};

export default getRandomInteger;