Can anyone tell me what is the wrong with this code

Tell us what’s happening:

Your code so far


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

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36.

Challenge: Escaping Literal Quotes in Strings

Link to the challenge:

Hi @trabelsi.n1000

Welcome to FCC forum. Have you followed the instructions?
The test expects something like var myStr = // Your string goes here. Nothing more. Look at your solution above.

1 Like

it still doesn’t work

What is your full updated code?

var myStr ="";

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

So you didn’t change anything from your original post?

You should only change the given code, not add an additional line.

var myStr = ""; // Change this line
// DO NOT PUT A SECOND LINE IN YOUR SOLUTION

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 (’).

1 Like

thank you very much, it works :smiley:

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.