dobao
February 3, 2020, 9:47pm
1
Tell us what’s happening:
Your code so far
var myStr = "I am a\"double quoted\"string inside\"double quotes\".";
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36.
Challenge: Escaping Literal Quotes in Strings
Link to the challenge:
https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/basic-javascript/escaping-literal-quotes-in-strings
ILM
February 3, 2020, 9:49pm
2
did you wanted to write I am a"double quoted"string inside"double quotes".?
hint: spaces matter
1 Like
dobao
February 3, 2020, 9:51pm
3
yes i do, i think i tried several ways but still got stuck
dobao
February 3, 2020, 10:41pm
5
Tell us what’s happening:
Your code so far
var myStr = "I am a \"double quoted \"string inside \"double quotes \".";
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36.
Challenge: Escaping Literal Quotes in Strings
Link to the challenge:
https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/basic-javascript/escaping-literal-quotes-in-strings
dobao
February 3, 2020, 10:47pm
7
where is my one extra space? can you please pointed out for me
vMimas
February 4, 2020, 3:40am
9
You’d probably get it right if you started over, set it back to the original backslash-missing starter string, and then carefully put in the backslashes before the quotes without touching the space bar or backspace keys. That might be the easiest way. But if you want to count spaces:
// You need this one below
var myStr = "I am a \"double quoted\" string inside \"double quotes\".";
var myStr = "I am a \"double quoted \"string inside \"double quotes \".";
// But you have that ^
dobao
February 4, 2020, 6:15am
10
i got it, thank you guys for all your help. you’re the best!
1 Like