From 452decc0a1f6496e960d43abcc3e7de1e0dd1924 Mon Sep 17 00:00:00 2001 From: asadgulxar10 <51773651+asadgulxar10@users.noreply.github.com> Date: Mon, 30 Sep 2019 12:54:16 +0500 Subject: [PATCH] Update main.js --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 6fb0fe5..3774a0c 100644 --- a/main.js +++ b/main.js @@ -13,7 +13,7 @@ const operators = ["+", "-", "x", "รท"]; function handleKeyPress (e) { const key = e.target.dataset.key; - const lastChar = operation[operation.length - 1]; + const lastChar = operation.pop(); use build in functions if (key === "=") { return;