Skip to content

Commit

Permalink
cut like half of code
Browse files Browse the repository at this point in the history
  • Loading branch information
Barosz30 committed Nov 10, 2023
1 parent f0e9ae8 commit b213d35
Showing 1 changed file with 7 additions and 18 deletions.
25 changes: 7 additions & 18 deletions src/makeRobotAccountant.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,15 @@

function makeRobotAccountant() {
// write code here
// random comment cuz i forgot to switch branch and need to make changes :P
let counter = 0;

function getSum(a) {
function bullshitNesting(b) {
if (counter > 2 && counter % 2 === 1) {
counter++;
return (a) => (b) => {
counter++;

return `Bzzz... Error!`;
} else {
counter++;

return a + b;
}
}

return bullshitNesting;
}

return getSum;
}
return counter > 2 && counter % 2 === 0
? `Bzzz... Error!`
: a + b;
};
};

module.exports = makeRobotAccountant;

0 comments on commit b213d35

Please sign in to comment.