From 485d336b8ed8b28320ba1429ba921addaac53ec9 Mon Sep 17 00:00:00 2001 From: Matthew Johnson Date: Thu, 8 Apr 2021 00:52:45 +0000 Subject: [PATCH] Done. --- index.js | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/index.js b/index.js index e69de29bb2..7c50e6f2d2 100644 --- a/index.js +++ b/index.js @@ -0,0 +1,39 @@ +function add(a, b){ + console.log(a+b) + return a+b +}; + +function subtract(a,b) { + console.log(a-b) + return a-b +}; + +function multiply(a,b) { + console.log(a*b) + return a*b +}; + +function divide(a,b) { + console.log(a/b) + return a/b +}; + +function increment(n) { + console.log(n++) + return n++ +} + +function decrement(n) { + console.log(n--) + return n-- +} + +function makeInt(n) { + console.log(parseInt(n,10)) + return parseInt(n,10) +} + +function preserveDecimal(n) { + console.log(parseFloat(n)) + return parseFloat(n) +}