Skip to content

Commit 16d5f3f

Browse files
committed
call join() on replacedArray
1 parent 5fe41ae commit 16d5f3f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,8 @@ function userClicksOnEqualButton(button) {
183183
} else {
184184
let result = eval(replacedArray.join(""));
185185
replacedArray.splice(replacedArray.length, 0, "=", result);
186-
console.log(replacedArray.join(""));
186+
history.push(replacedArray.join(""))
187+
console.log(history);
187188

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

0 commit comments

Comments
 (0)