Skip to content

Commit

Permalink
call join() on replacedArray
Browse files Browse the repository at this point in the history
  • Loading branch information
josueJURE committed Dec 23, 2023
1 parent 5fe41ae commit 16d5f3f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,8 @@ function userClicksOnEqualButton(button) {
} else {
let result = eval(replacedArray.join(""));
replacedArray.splice(replacedArray.length, 0, "=", result);
console.log(replacedArray.join(""));
history.push(replacedArray.join(""))
console.log(history);

displayResult(replacedArray, result);
screen.innerText = !Number.isFinite(result) ? "You cannot divide by zero. Press AC" : result;
Expand Down

0 comments on commit 16d5f3f

Please sign in to comment.