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.", "

Instructions

", "Assign the following three lines of text into the single variable myStr using escape sequences.", - "
FirstLine
\\SecondLine\\
ThirdLine
", + "
FirstLine
    \\SecondLine
ThirdLine
", "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.", - "FirstLinenewlinebackslashSecondLinebackslashcarriage-returnThirdLine" + "FirstLinenewlinetabbackslashSecondLinenewlineThirdLine" ], "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: 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ódigoSalida
\\'apostrofe
\\\"comilla
\\\\barra invertida
\\nnueva línea
\\rretorno de carro
\\ttabulación
\\bretroceso
\\fsalto de página
", "Nota que la barra invertida por si misma tiene que ser escapada con el fin de mostrarse como una barra invertida.", "

Instrucciones

", - "Codifica la siguiente secuencia, separada por espacios:
barra invertida tabulación tabulación retorno de carro nueva línea y asignala a myStr" + "Codifica la siguiente secuencia, separada por espacios:
FirstLinenueva líneatabulaciónbarra invertidaSecondLinenueva líneaThirdLine" ] } }