Skip to content

Commit 6b9395d

Browse files
committed
about_strings
1 parent 0d5cc83 commit 6b9395d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

topics/about_strings.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,31 @@ module("About Strings (topics/about_strings.js)");
44
test("delimiters", function() {
55
var singleQuotedString = 'apple';
66
var doubleQuotedString = "apple";
7-
equals(singleQuotedString === doubleQuotedString, __, 'are the two strings equal?');
7+
equals(singleQuotedString === doubleQuotedString, true, 'are the two strings equal?');
88
});
99

1010
test("concatenation", function() {
1111
var fruit = "apple";
1212
var dish = "pie";
13-
equals(fruit + " " + dish, __, 'what is the value of fruit + " " + dish?');
13+
equals(fruit + " " + dish, "apple pie", 'what is the value of fruit + " " + dish?');
1414
});
1515

1616
test("character Type", function() {
1717
var characterType = typeof("Amory".charAt(1)); // typeof will be explained in about reflection
18-
equals(characterType, __, 'Javascript has no character type');
18+
equals(characterType, "string", 'Javascript has no character type');
1919
});
2020

2121
test("escape character", function() {
2222
var stringWithAnEscapedCharacter = "\u0041pple";
23-
equals(stringWithAnEscapedCharacter, __, 'what is the value of stringWithAnEscapedCharacter?');
23+
equals(stringWithAnEscapedCharacter, "Apple", 'what is the value of stringWithAnEscapedCharacter?');
2424
});
2525

2626
test("string.length", function() {
2727
var fruit = "apple";
28-
equals(fruit.length, __, 'what is the value of fruit.length?');
28+
equals(fruit.length, 5, 'what is the value of fruit.length?');
2929
});
3030

3131
test("slice", function() {
3232
var fruit = "apple pie";
33-
equals(fruit.slice(0,5), __, 'what is the value of fruit.slice(0,5)?');
33+
equals(fruit.slice(0,5), "apple", 'what is the value of fruit.slice(0,5)?');
3434
});

0 commit comments

Comments
 (0)