-
Notifications
You must be signed in to change notification settings - Fork 2
/
church.htm
30 lines (26 loc) · 1.04 KB
/
church.htm
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
<html>
<head>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.4.3.min.js"></script>
<script type="text/javascript" src="church.js"></script>
<script type="text/javascript">
$(function() {
for (var i=0; i<20; i++) {
$('#nextChurch').append('Testing ' + i + '... ')
.append((testRoundTrip(i)) ? 'passed' : 'failed')
.append('!<br>');
}
$('#churchOne').append(testChurch(churchOne, 1) ? 'passed!' : 'failed!');
$('#churchTwo').append(testChurch(churchTwo, 2) ? 'passed!' : 'failed!');
});
</script>
</head>
<body>
<h2>Church Numerals in JavaScript</h2>
<p>See <code>church.js</code> for the fun part.</p>
<div id="nextChurch">Testing Church numerals created by repeated applications of <code>nextChurch</code>: <br></div>
<hr>
<div id="churchOne">Testing the explicit <code>churchOne</code> variable: </div>
<hr>
<div id="churchTwo">Testing the explicit <code>churchTwo</code> variable: </div>
</body>
</html>