Escaping Strings

i don’t know where im going wrong but i cant seem to run the code and move on to the next challenge

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

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:81.0) Gecko/20100101 Firefox/81.0.

Challenge: Escaping Literal Quotes in Strings

Link to the challenge:

you are missing spaces and punctuation

try writing console.log(myStr) as last line of your code and confront it with the string you are required to print


I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).

Not a big mistake you are missing a space after “I am a” and missing a full stop in the last.
Run the code below this will help

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

:innocent:

the error im still getting is: Variable myStr should contain the string:

I am a "double quoted" string inside "double quotes".

i don’t know what i really changed but it eventually works… thank you guys :slight_smile:

1 Like

Ok I think its not a programming error you are typing something wrong here is my code below I would suggest you copy my code, past it, and compare it with your code

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

compare your code against my code and you will get the mistake you are making.

my code is right it’s passing all the testsCapture .

1 Like