We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ad5bada commit bdba0a3Copy full SHA for bdba0a3
src/games/brainEven.js
@@ -1,9 +1,9 @@
1
2
import { theMotor } from '../../index.js';
3
-const getRandomNum = (min, max) => Math.floor(Math.random() * (max - min + 1) + min);
+const getRandomNum = (min = 1, max = 99) => Math.floor(Math.random() * (max - min + 1) + min);
4
const isEven = (number) => number % 2 === 0;
5
6
-const description = '"yes" if the number is even, otherwise answer "no".';
+const description = 'Answer "yes" if the number is even, otherwise answer "no".';
7
const genRounds = ()=>{
8
const minNum = 1;
9
const maxNum = 100;
@@ -16,5 +16,4 @@ const gameven = () =>{
16
theMotor(description, genRounds)
17
};
18
19
-export {getRandomNum, gameven};
20
-
+export {getRandomNum, gameven};
0 commit comments