Skip to content

Commit e972a23

Browse files
authored
Merge pull request liammclennan#55 from cytrowski/improvement/better-suggestions
Display more details in splice example
2 parents e524f7a + 63a31e9 commit e972a23

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

jskoans.htm

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2-
"http://www.w3.org/TR/html4/loose.dtd">
1+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2+
"http://www.w3.org/TR/html4/loose.dtd">
33
<html>
44
<head>
55
<script src="support/jquery-1.4.1.js"></script>
@@ -26,8 +26,7 @@
2626
<script type="text/javascript" src="topics/about_functions_and_closure.js"></script>
2727
<script type="text/javascript" src="topics/about_this.js"></script>
2828
<script type="text/javascript" src="topics/about_scope.js"></script>
29-
<script type="text/javascript" src="topics/about_regular_expressions.js"></script>
30-
29+
<script type="text/javascript" src="topics/about_regular_expressions.js"></script>
3130
</head>
3231
<body>
3332
<h1 id="qunit-header">JavaScript Koans</h1>

topics/about_arrays.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@ test("length", function() {
1919
test("splice", function() {
2020
var daysOfWeek = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'];
2121
var workingWeek = daysOfWeek.splice(__, __);
22-
ok(workingWeek.equalTo([__]), 'what is the value of workingWeek?');
23-
ok(daysOfWeek.equalTo([__]), 'what is the value of daysOfWeek?');
22+
var weekend = daysOfWeek;
23+
24+
deepEqual(workingWeek, ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday'], 'what is the value of workingWeek?');
25+
deepEqual(weekend, ['Saturday', 'Sunday'], 'what is the value of weekend?');
2426
});
2527

2628
test("stack methods", function() {

0 commit comments

Comments
 (0)