Tell us what’s happening:
I am stuck at this lesson where it is said to use backslashes to assign a string to the myStr variable so that if it were to be printed to the console, I would see:
I am a “double quoted” string inside “double quotes”.
When I run the test it says - Variable myStr should contain the string: I am a “double quoted” string inside “double quotes”.
Is there anything I am doing wrong or there is some kind of bug in the software? whatever the reason be I need to pass the lesson to move on to the next one.
Please help.
Your code so far
var myStr = “I am a “double qouted” string inside “double qoutes”.”;
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36.
Just re-read your initial post about the “Your code so far” section not showing your backslashes.
Can you change your post to show “(backslash)” where you have them in your code? Hopefully we’ll be able to get a better understanding of where you’re at
I am here and I believe I have answered it correctly but still I get an erro. I maybe need to have a way of escaping this part and move on since it is not the only stuff I need to learn in javascript. Here is the answer I provided:
var myStr ="\ I am a \ "double quoted\" string inside \ " double quotes \ "." ; // Change this line
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 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.
Thank you. I am new here and so I appreciate your help and kindness. I am just a little frustrated because I have followed what you have suggested and I do not know why I do not seem to get it right. Here is the screenshot: