diff --git a/README.md b/README.md index 6999a7b0cd..3f968ac3ef 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,127 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # JavaScript Arithmetic Lab ## Objectives diff --git a/index.js b/index.js index e69de29bb2..7fce1f1ee2 100644 --- a/index.js +++ b/index.js @@ -0,0 +1,29 @@ +var a,b; + +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 increment(n) { +return ++n; + } +function decrement(n) { +return --n; +} +function makeInt(n) { +Number = parseInt(n , 10); // NaN +return Number; + +} +function preserveDecimal(n) { + Number = parseFloat(n , 10); //NaN + return Number; +}