Skip to content
Open

Done #96

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<div id="mocha"></div>
<script src="node_modules/mocha/mocha.js"></script>
<script src="node_modules/expect/umd/expect.min.js"></script>
<script src="node_modules/sinon/pkg/sinon.js"></script>
https://learn.co/tracks/accelerated-prep/week-2/functions-and-scope/javascript-arithmetic-lab# <script src="node_modules/sinon/pkg/sinon.js"></script>
<script>mocha.setup('bdd');</script>
<script src="index.js"></script>
<script src="test/index-test.js"></script>
Expand Down
34 changes: 34 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -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)
}