diff --git a/seed/challenges/01-front-end-development-certification/basic-javascript.json b/seed/challenges/01-front-end-development-certification/basic-javascript.json index f346c6d67ed48c..4c2c9167f271ed 100644 --- a/seed/challenges/01-front-end-development-certification/basic-javascript.json +++ b/seed/challenges/01-front-end-development-certification/basic-javascript.json @@ -1163,10 +1163,10 @@ "Note that the backslash itself must be escaped in order to display as a backslash.", "
myStr
using escape sequences.",
- "FirstLine", + "
\\SecondLine\\
ThirdLine
FirstLine", "You will need to use escape sequences to insert special characters correctly. You will also need to follow the spacing as it looks above, with no spaces between escape sequences or words.", "Here is the text with the escape sequences written out.", - "
\\SecondLine
ThirdLine
FirstLine" + "newline
backslash
SecondLinebackslash
carriage-return
ThirdLine
FirstLine" ], "releasedOn": "January 1, 2016", "challengeSeed": [ @@ -1177,16 +1177,16 @@ "tail": [ "(function(){", "if (myStr !== undefined){", - "console.log('myStr: '+ myStr);}})();" + "console.log('myStr:\\n' + myStr);}})();" ], "solutions": [ - "var myStr = \"FirstLine\\n\\\\SecondLine\\\\\\rThirdLine\";" + "var myStr = \"FirstLine\\n\\t\\\\SecondLine\\nThirdLine\";" ], "tests": [ - "assert(myStr === \"FirstLine\\n\\\\SecondLine\\\\\\rThirdLine\", 'message:newline
tab
backslash
SecondLinenewline
ThirdLine
myStr
should have encoded text with the proper escape sequences and no spacing.');",
- "assert(myStr.match(/\\n/g).length == 1, 'message: myStr
should have one newline character \\n
');",
- "assert(myStr.match(/\\r/g).length == 1, 'message: myStr
should have one carriage return character \\r
');",
- "assert(myStr.match(/\\\\/g).length == 2, 'message: myStr
should have two correctly escaped backslash characters \\\\
');"
+ "assert(myStr === \"FirstLine\\n\\t\\\\SecondLine\\nThirdLine\", 'message: myStr
should have encoded text with the proper escape sequences and no spacing.');",
+ "assert(myStr.match(/\\n/g).length == 2, 'message: myStr
should have two newline characters \\n
');",
+ "assert(myStr.match(/\\t/g).length == 1, 'message: myStr
should have one tab character \\t
');",
+ "assert(myStr.match(/\\\\/g).length == 1, 'message: myStr
should have one correctly escaped backslash character \\\\
');"
],
"type": "waypoint",
"challengeType": 1,
@@ -1198,7 +1198,7 @@
"Código | Salida |
---|---|
\\' | apostrofe |
\\\" | comilla |
\\\\ | barra invertida |
\\n | nueva línea |
\\r | retorno de carro |
\\t | tabulación |
\\b | retroceso |
\\f | salto de página |
barra invertida tabulación tabulación retorno de carro nueva línea
y asignala a myStr
"
+ "Codifica la siguiente secuencia, separada por espacios:FirstLine" ] } }nueva línea
tabulación
barra invertida
SecondLinenueva línea
ThirdLine