From 8cc5f3c5461bb0913deb0fb2c49afe42456bbb27 Mon Sep 17 00:00:00 2001 From: Eric Leung Date: Tue, 5 Apr 2016 00:24:53 -0700 Subject: [PATCH] Clarify why escape a particular quote type pair --- .../basic-javascript.json | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/challenges/01-front-end-development-certification/basic-javascript.json b/challenges/01-front-end-development-certification/basic-javascript.json index e10ae3470f4..362b23c7888 100644 --- a/challenges/01-front-end-development-certification/basic-javascript.json +++ b/challenges/01-front-end-development-certification/basic-javascript.json @@ -985,7 +985,8 @@ "description": [ "String values in JavaScript may be written with single or double quotes, so long as you start and end with the same type of quote. Unlike some languages, single and double quotes are functionally identical in JavaScript.", "\"This string has \\\"double quotes\\\" in it\"", - "The value in using one or the other has to do with the need to escape quotes of the same type. If you have a string with many double quotes, this can be difficult to read and write. Instead, use single quotes:", + "The value in using one or the other has to do with the need to escape quotes of the same type. Unless they are escaped, you cannot have more than one pair of whichever quote type begins a string.", + "If you have a string with many double quotes, this can be difficult to read and write. Instead, use single quotes:", "'This string has \"double quotes\" in it. And \"probably\" lots of them.'", "

Instructions

", "Change the provided string from double to single quotes and remove the escaping." @@ -3445,9 +3446,6 @@ "solutions": [ "function myTest(val) {\n var answer = \"\";\n\n switch (val) {\n case 1:\n answer = \"alpha\";\n break;\n case 2:\n answer = \"beta\";\n break;\n case 3:\n answer = \"gamma\";\n break;\n case 4:\n answer = \"delta\";\n }\n return answer; \n}" ], - "MDNlinks": [ - "Switch Statement" - ], "tests": [ "assert(myTest(1) === \"alpha\", 'message: myTest(1) should have a value of \"alpha\"');", "assert(myTest(2) === \"beta\", 'message: myTest(2) should have a value of \"beta\"');", @@ -3457,6 +3455,9 @@ "assert(code.match(/break/g).length > 2, 'message: You should have at least 3 break statements');" ], "type": "waypoint", + "MDNlinks": [ + "Switch Statement" + ], "challengeType": 1, "titleEs": "Seleccionar desde diferentes opciones con la sentencia switch", "descriptionEs": [