I am trying to escape from the "escaping literal quotes in strings" challenge!

I am trying to escape from the "escaping literal quotes in strings" challenge!
0

#1

Tell us what’s happening:
I am at a loss. I have tried each of the other attempts presented by others to no avail. I have removed the “” marks and put them back. I ensured that I used the right number of . and “” marks. I get the following warnings on the red and white x from the code below: expected an assignment or function call and instead saw an expression, missing semi-colon, unexpected , expected an assignment or function call and instead saw an expression, missing semi-colon
Thanks!

Randall, whatever you said to change, I didn’t see. Are we supposed to put the actual line above the line to be changed like: ```var myStr= I am a “double quoted” string inside “double quotes”. and then fix the actual line?
Your code so far

var myStr; I am a \"double quoted"\ string inside \"double quotes"\".";  // Change this line

Your browser information:

Your Browser User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:55.0) Gecko/20100101 Firefox/55.0.

Link to the challenge:


#2

I got the following errors: missing semicolon (twice) expected an assignment or function call and instead saw an expression (twice) unexpected \ . I tried with and without the actual " " marks to no avail. I tried substituting an = for the first ; after myStr.


#3
  1. You need to assign the string to the variable myStr using the = operator.

  2. Start your string with a double quote "

  3. If you want to actually display a double quote, you must use \", like you do with

am a \"double quoted

See if you can further now.


#4
var myStr = "I am a \"double quoted"\ string inside \"double quotes"\".";
``` I used the = sign which makes sense to me more than the first ; and the double quotes. I get errors of unexpected \ and missing semi-colon. The black box says syntax error: illegal character. Do I need another space after the period? and before the last semi-colon. I don't understand why the period needs to be in quotes, at least according to one response to the hints.  Thanks again, btw.

#5

var myStr; "I am a \"double-quoted\"string inside \"double quotes\"."; // Change this line

I got the top part right, but not: Variable myStr should contain the string: I am a “double quoted” string inside “double quotes”.


#6

The code finally took after a few resets and page refreshes! Thanks!