madhuri
September 23, 2020, 8:14am
1
Tell us what’s happening:
its showing wrong can anyone help me
Your code so far
var myStr=I am a "double quoted" string inside "double quotes".";
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/85.0.4183.102 Safari/537.36
.
Challenge: Escaping Literal Quotes in Strings
Link to the challenge:
Learn to code. Build projects. Earn certifications.Since 2015, 40,000 graduates have gotten jobs at tech companies including Google, Apple, Amazon, and Microsoft.
As @madhuri mentioned, you’re using a forward slash. To escape characters you use a backslash ( \
) in JavaScript.
`var myStr = "I am a \"double quoted string inside double quotes\".";`
madhuri
September 23, 2020, 9:19am
3
[quote=“DuongQuocViet, post:2, topic:422281”]
its showing wrong
ilenia
September 23, 2020, 10:27am
4
make sure you have only one of the two strings inside your code.
in both cases you are missing the quote at the start of the string, other than that the second line is pretty good