Need assistance in Escaping Literal Quotes in Strings - Beta Version


#1

Challenge Name

Escaping Literal Quotes in Strings has an issue.

Issue Description

Browser Information

User Agent is: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36.

Screenshot

Your Code



var myStr = "I am a\"double quoted\" string inside\"double quotes\"."; // Change this line




#2

Your code is missing a couple spaces before backslashes.


#3

What about using `` instead? (ES6) You don’t have to worry about either ’ or "


#4

Guys, click on the link - he’s saying there’s a problem with the exercise itself…cannot type in code at all:

Escaping Literal Quotes in Strings


#5

I clicked on the link and the code starts out with var myStr = ""; not what he posted. Is the exercise broken? I’m on the same Chrome version as posted (on Mac though so that could be why) and mine works fine.

Sorry for misinterpreting the post.


#6

@N4thyra I can’t use single quotes cause the exercise says

You should use two double quotes (") and four escaped double quotes (")

@Soupedenuit Oh no, the exercise starts with var myStr = " ";
However with the code I have inputed, it’s refusing to pass the second test.

Variable myStr should contain the string: I am a “double quoted” string inside “double quotes”.


#7

Do you have spaces before both of the \"double quoted\"? Unless I’m missing something that’s what’s wrong with the original code


#8

@anasey01 - What @MindOfThomas is saying is you have:

var myStr = "I am a\"double quoted\" string inside\"double quotes\"."; // Change this line

and you should have:

var myStr = "I am a \"double quoted\" string inside \"double quotes\"."; // Change this line


#9

@rmdawson71 @MindOfThomas

It worked! Thank you!