THIS TASK DOESNT WORK! can someone help me? I did it right

Tell us what’s happening:

Your code so far


var 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/81.0.4044.138 Safari/537.36.

Challenge: Escaping Literal Quotes in Strings

Link to the challenge:

You are missing some spaces between >> quoted"string <<

inside"double <<

Guide yourself on the result displayed in the console, bottom of the window


It will almost always tell you what happens

this should be the result:

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

but with code I wrote above, it doesn’t get it right ?!

Try to type this in the challenge editor:

console.log(myStr);

and see the result…

I tested

again with var myStr = " I am a "double quoted " string inside “double quotes”. ";

it shows :

myStr = " I am a "double quoted " string inside “double quotes”. "

Look closely, your spaces are a bit off in your string.

changed the spacing:

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

still, it doesn’t get it right :frowning:

Can you please use the </> button or add backticks ``` on lines before and after your code so that we can see it?

Check what I told you, in the first answer

var myStr = “I am a “double quoted"string inside"double quotes”.”;
var myStr = “I am a “double quoted” string inside “double quotes”.”;
Observe the difference between the two, the first is incorrect, the second is correct … You only need spaces between some words

1 Like

In this case, there might be an extension that has access to FCC that might cause it to fail. Try to disable some of those extensions.

2 Likes

ok. I remove them right away!

So you know, its harder for us to help with screenshots. If you provide the text of the code you are using, with the </> button or with backticks ```, we can copy and paste your code to check for problems with browser extensions.

As @JeremyLT said,

  • Next time you want to showcase a code, use the ``` backtick so it is easier for everyone to read.
    The “preformatted text” tool in the editor (</>) will also add backticks around text.
1 Like
var myStr = "I am a \"double quoted\" string inside \"double quotes\".";// Change this line

I wrote this piece of code.it is supposed to give this result:

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

but it doesn’t. I changed spacing like @jesusrbritol said. and removed extension as @Catalactics said. still same result :pensive:

Your code works perfectly fine with me. As I already said, remove the extensions and then reload the page then try it again. If this doesn’t work, you can try to use incognito mode, sign in and try it there, to prevent the website to use the cache.

2 Likes

This exact string is correct. I’d try clearing your cache or using a different browser.

2 Likes

Ok thank you @Catalactics and @JeremyLT.

2 Likes