UNPKG

hexlet-braingames-by-mput

Version:

Learning Hexlet.io node.js project implementation.

9 lines (6 loc) 197 B
const randomInt = (max) => { // return random number from 1 to max included. const randomInteger = (Math.floor(Math.random() * max)) + 1; return randomInteger; }; export default randomInt;