-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
37 lines (29 loc) · 1.12 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>KaoruDev - Mentoring JS closures</title>
<link href="https://cdn.rawgit.com/mochajs/mocha/2.2.5/mocha.css" rel="stylesheet" />
</head>
<body>
<div id="mocha"></div>
<script src="https://cdn.rawgit.com/jquery/jquery/2.1.4/dist/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/chai/3.4.1/chai.min.js"></script>
<script src="https://cdn.rawgit.com/mochajs/mocha/2.2.5/mocha.js"></script>
<script src="lib/add-by.js"></script>
<script src="spec/add-by-spec.js"></script>
<script type="text/javascript">
window.expect = chai.expect;
mocha.run();
</script>
<script>
var addByFive = addBy(5);
console.log(addByFive(2)); //should console log 7
console.log(addByFive(5)); //should console log 10
var addByTen = addBy(10);
console.log(addByTen(2)); //should console log 12
console.log(addByTen(5)); //should console log 12
</script>
</body>
</html>