From 48f294788079e1e5bc9acbd5a5a1f3ce40783f07 Mon Sep 17 00:00:00 2001 From: sweatshirt0 Date: Mon, 23 Jan 2023 15:48:49 -0500 Subject: [PATCH] subtraction added to calc app --- calculator.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/calculator.js b/calculator.js index 661bc4d..9d72219 100644 --- a/calculator.js +++ b/calculator.js @@ -12,3 +12,7 @@ let op = prompt("What operation? "); if (op == "+") { console.log(Number(c) + Number(d)); } + +if (op == "-") { + console.log(Number(c) - Number(d)); +}