From 127a58aeeb3fa1cc5bd45b432f0a6c4c96bbd598 Mon Sep 17 00:00:00 2001 From: "czurak87@gmail.com Czurak" Date: Sat, 20 Jan 2018 12:49:58 +0000 Subject: [PATCH] Done. --- index.html | 2 +- index.js | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index a1f0995..50d7e32 100644 --- a/index.html +++ b/index.html @@ -14,7 +14,7 @@
- +https://learn.co/tracks/accelerated-prep/week-2/functions-and-scope/javascript-arithmetic-lab# diff --git a/index.js b/index.js index e69de29..d0127ac 100644 --- a/index.js +++ b/index.js @@ -0,0 +1,34 @@ +function add(a, b) { + return a + b +} + +function subtract(a, b) { + return a - b +} + +function multiply(a, b) { + return a * b +} + +function divide(a, b) { + return a / b +} + +function inc(n) { + return n += 1 +} + +function dec(n) { + return n -= 1 +} + +function makeInt(n) { + return parseInt(n, 10) +} + +function preserveDecimal(n) { + return parseFloat(n) +} + + +