@@ -4,31 +4,31 @@ module("About Strings (topics/about_strings.js)");
44test ( "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
1010test ( "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
1616test ( "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
2121test ( "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
2626test ( "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
3131test ( "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