diff --git a/challenges/01-front-end-development-certification/basic-javascript.json b/challenges/01-front-end-development-certification/basic-javascript.json index 1bfb35e9dc1..d663ef635a2 100644 --- a/challenges/01-front-end-development-certification/basic-javascript.json +++ b/challenges/01-front-end-development-certification/basic-javascript.json @@ -1164,10 +1164,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" + "newlinebackslashSecondLinebackslashcarriage-returnThirdLine
FirstLine" ], "releasedOn": "January 1, 2016", "challengeSeed": [ @@ -1178,16 +1178,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:newlinetabbackslashSecondLinenewlineThirdLine
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,
@@ -1199,7 +1199,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íneatabulaciónbarra invertidaSecondLinenueva líneaThirdLine