Skip to content

Commit

Permalink
make lint
Browse files Browse the repository at this point in the history
  • Loading branch information
duker221 committed Oct 30, 2023
1 parent 95834f7 commit d3fc2b9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/games/calc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ import getRandomNumber from '../utils.js';
const operators = ['+', '-', '*'];

const calculateExpression = (randomExpression, operandA, operandB) => {
switch(randomExpression) {
switch (randomExpression) {
case '+':
return operandA + operandB;
break;
case '-':
case '-':
return operandA - operandB;
break;
case '*':
return operandA * operandB;
break;
default:
throw new Error(`Unknown expression: '${randomExpression}'!`);
};
}
};

const createGameData = () => {
Expand Down
4 changes: 2 additions & 2 deletions src/games/gcd.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const commonDivisor = (numberA, numberB) => {
const cycleLength = Math.max(numberA, numberB);

const arr = [];

for (let i = 1; i <= cycleLength; i += 1) {
if (numberA % i === 0 && numberB % i === 0) {
arr.push(i);
Expand All @@ -27,7 +27,7 @@ const createGameData = () => {
const numberA = getRandomNumber(0, 100);
const numberB = getRandomNumber(0, 100);

const question = `${numberA}, ${numberB}`;
const question = `${numberA} ${numberB}`;

const answer = String((commonDivisor(numberA, numberB)));

Expand Down

0 comments on commit d3fc2b9

Please sign in to comment.