Freecodecamp Website Lesson Not Running a Test Result

I am working on the homework for this week, and when running a test on a question, the site will not run the test. Something is wrong. Help, please.

Link is below:

You may have a syntax error in the code. Can you provide your code ?

var myStr = \ I am a “double quoted” string inside “double quotes”.";
Also, even when I click the ‘Get a Hint’ button, nothing happens.

Yeah, that doesn’t look correct. You want to have some kind of quotes around the whole string, either double or single.
Also review the lesson, because you need to escape the inside quotes to make this string valid.

Hi, I’ve read the lesson again, is this correct?

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

I’ve edited your post for readability. When you enter a code block into the forum, precede it with a line of three backticks and follow it with a line of three backticks to make easier to read. See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.


use the backslash to escape double quotes in the string. i-e

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

Anything inside double quotes is considered a string. So when we want double quotes to be part of the string, we use backslash\ which tells the parser that particular quote is not part of code

No, your current attempt is not correct either. Remember, since you surrounded your string with " and ", if you want the string to contain an actual double quote, you must write \".

@ridafatima15h1 Please provide hints, suggestions, and examples, but not full solutions. Thank you. Your code has been blurred to prevent spoiling the solution for the OP.