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) +} + + +