Hi guys i don't understand where the problem are could some one help me?

hello every one, i kent find de ploblem wish my code can some help me?

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

Your browser information:

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

Challenge: Escaping Literal Quotes in Strings

Link to the challenge:

You need to use the escape character for the double quotes enclosed inside the myStr string so that those inner double quotes are considered what they are and not confused with the outer double quotes.

That’s what the whole challenge is about. If the escape characters are not used inside, the opening quote of “double quoted” will be taken as the closing quote of "I am a.

I didn’t test it but it looks like you have extra spaces in there.

Try to erase the excess spaces between

and

Along with adding a semicolon at the end of your code.

There are more extra spaces than that. Javascript automatically inserts semicolons so that is not an issue, semicolons are only needed to be typed in certain situations and this is not one of those. But using semicolons or not is a debatable issue as any internet search will uncover.

Will keep that information I my head, thank you for your corrections

Hola, no dejes espacios.

var problemStr = “I am a " double quoted{extraspace}” string inside " double quotes{extraspace}"."

var myStr = “I am a “double quoted” string inside “double quotes”.” \valid one

In your string smiley is extra space in your string as marked {extraspace}

1 Like

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