freeCodeCamp: Typo in Instructions Section missing quotes

Challenge Escaping Literal Quotes in Strings has an issue. User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/601.5.17 (KHTML, like Gecko) Version/9.1 Safari/601.5.17. Please describe how to reproduce this issue, and include links to screenshots if possible.

My code:

var myStr; // Change this line

myStr="I am a \"double quoted\" string inside \"double quotes\" ";

The instructions say the following:

if you were to print it to the console, you would see:

I am a “double quoted” string inside “double quotes”

The instructions ask for a phrase that only has quotes around the words “double quoted” and “double quotes,” but if you write code that accomplishes this, the answer is marked wrong and the second requirement appearing in the bottom left corner with a red circled x icon says the entire phrase should be in quotes as follows:

Variable myStr should equal to (“I am a “double quoted” string inside “double quotes””).

screen shot 2016-04-18 at 5 27 18 pm

Note how in screenshot the console output for myStr is identical to what instructions ask for, yet the answer is still marked incorrect.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 15 (8 by maintainers)

Most upvoted comments

@SaintPeter leave the double quotes in the output? The output right now with the correct code will print out the string:

myStr = I am a "double quoted" string in "double quotes"

But I think the output should just be:

I am a "double quoted" string in "double quotes"

Plus, we could change the last test to the following to match the output.

If you printed out myStr to console.log, it will print I am a "double quoted" string inside "double quotes"

It isn’t as direct because you don’t actually need to send anything to console.log but the output will reflect what would happen if you did print it to the console.

I suggest this last test rewording because right now, it says the string should be equal to "I am a "double quoted" string inside "double quotes"", which wouldn’t actually work if you copy-pasted it because of consecutive double quotes.