tctq
April 24, 2021, 11:04pm
1
Tell us what’s happening:
can someone tell me what i did wrong and explain the purpose of this subject…
it’ s very unclear to me…
ty
Your code so far
var myStr = "I am a \"double quoted\"."; // Change this line
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36
.
Challenge: Escaping Literal Quotes in Strings
Link to the challenge:
What do you see when you console.log(myStr)
using this code?
Is it different than what you should see, according to the challenge instructions?
I am a "double quoted" string inside "double quotes".
tctq
April 25, 2021, 12:42am
3
yes it is different… I’m not getting the right code…
console output
myStr = “I am a “double quoted”.”
i did exactly What they explained in the example… but i still wrong
Hi @tctq !
The correct output is this
I am a "double quoted" string inside "double quotes".
You wrote this
I am a “double quoted”.
You are missing some text.
tctq
April 25, 2021, 2:30am
5
i try to wrote differently like you show me … but i still dont get the writ answer.
maybe i put the (’’) in the wrong place?
can you show me the rigth answer
Can I see your updated code?
tctq
April 25, 2021, 2:33am
7
var myStr ='I am a "double quoted" string inside "double quotes".'; // Change this
The text is now correct.
The first change you need to make is to have double quotes on the outside like this
var myStr ="I am a "double quoted" string inside "double quotes"."; // Change this
once you make that fix, then you need to escape the inner quotes.
That is what the lesson is trying to teach you.
Here is the FCC example again
\"Peter is learning JavaScript\"
Apply those backslashes \
here
tctq:
"double quoted"
and here
tctq:
"double quotes"
make sense?
1 Like
tctq
April 25, 2021, 2:56am
9
var myStr ="I am a \"double quoted\" string inside \"double quotes\"."; // Change this
thank you so much!
sometime i feel so bad when i fail
but now I succeeded thanks to you! You’re great and i hope i can help you to someday…
1 Like
I am glad you were able to solve the problem
You don’t have to feel bad about making mistakes.
That’s how we learn
1 Like
system
Closed
October 24, 2021, 2:58pm
11
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.