From a6e024a860a9f44b51f5ec9eb216e925e7c76ea1 Mon Sep 17 00:00:00 2001 From: seabelle mcfarlane Date: Mon, 22 Jan 2018 18:37:51 +0000 Subject: [PATCH] Done. --- index.js | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/index.js b/index.js index e69de29..89ae910 100644 --- a/index.js +++ b/index.js @@ -0,0 +1,33 @@ +var a = 5 +var b = 10 +function add(a,b){ + return a + b; + } + add() + function subtract(a,b){ + return a - b; + } + subtract() + function multiply(a,b){ + return a * b; + } + multiply() + function divide(a,b){ + return a / b; + } + divide() + function inc(n){ + return n += 1; + } + inc() + function dec(n){ + return n -= 1; + } + dec() + function makeInt(n){ + return parseInt(n, 10); + } + preserveDecimal() + function preserveDecimal(n){ + return parseFloat(n); + }