Escaping Literal Quotes in Strings does not work

My code so far:

const myStr = "I am a / double quoted / string inside /  double quotes/"; 

I need to use these words for the challenge.

My browser is Opera

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

Challenge: Escaping Literal Quotes in Strings

Link to the challenge:

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

HI @eric.sertel !

Welcome to the forum!
I would reset the lesson.

A few issues.

No.1:
You need to use the \ backslash
Not forward slash/

No.2:
You need to add the quotes inside the string.

Take a careful look at the example they gave you.

const sampleStr = "Alan said, \"Peter is learning JavaScript\".";

You see how they use quotes around Peter is learning JavaScript

\"Peter is learning JavaScript\"

That is the correct structure for your challenge.

Hope that helps!

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