morphydidius/frontend-project-lvl1

View on GitHub
src/random.js

Summary

Maintainability
A
0 mins
Test Coverage
// случайное число из диапазона
const getRandomNumber = (min, max) => {
  const randNumer = min + Math.random() * (max + 1 - min);
  return Math.floor(randNumer);
};

export default getRandomNumber;