What is happening? Help me!

Tell us what’s happening:
Help I tried a long time idk what is happening…
Your code so far

var myStr = "I am a \"double quoted\" string inside \"double qoutes\"." 
console.log(myStr) // Change this line

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.3 Safari/605.1.15.

Challenge: Escaping Literal Quotes in Strings

Link to the challenge:

Could you elaborate on what you’re asking exactly?

Do you just want the two lines of code explained?

As the task describes:

In JavaScript, you can escape a quote from considering it as an end of string quote by placing a backslash ( \ ) in front of the quote.

In other words, you can cancel the functionality something might provide and have it treated like a literal character by putting a black slash infront of it.

The same as escaping markdown, for example.

This is italics, performed by putting an underscore before and after what I want to italicize.

_With a black slash infront, it cancels the behavior of the underscores._

you swapped two letters here

1 Like

What do you mean? I am bad at JS

She wasn’t commenting on your JS - it’s a spelling thing. The word is “quotes”, not “qoutes”.

1 Like

When I fix that, it passes for me.

1 Like

Ty! It works for me!