Escaping Literal Quotes in Strings assistance

Escaping Literal Quotes in Strings assistance
0

#1

Tell us what’s happening:

Your code so far


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


Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/escaping-literal-quotes-in-strings/


#2

A very small mistake.

You forgot the Full Stop (.) at the end of the sentence.


#3

##It still not working sir


#4

You are probably doing something wrong.

Before the closing quote (") add a full stop (.)

And it will work.


#5

##it doesn’t please sir what else am i getting wrong?


#6

Can you reply back with your latest code attempt?

To 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.

Note: Backticks are not single quotes.


#7

English sentences start with a capital letter and end with a full stop.

Are you doing that?

Your code: var myStr = "I am a \"double quoted\" string inside \"double quotes\""; doesn’t contain that point that indicates the end of the sentence.

If you console log myStr, you will get: I am a “double quoted” string inside "double quotes"
Try to compare it with this: I am a “double quoted” string inside “double quotes”.

is it the same?

No, there’s a slight difference.


#8
var myStr= " I am a  \"double quoted\" string inside \"double quotes\. ""; // change this line


#9

3 problems:

  1. You have an extra double quote

  2. After the word quotes, there should be a literal doublequote.

  3. You have a space character after the period which should not be there.


#10
  1. You are putting the Full Stop in the wrong place. It should be at the end before the final, closing quote ("): ."

  2. There shouldn’t be any space around double quotes: \"double quotes\"

It’s very easy bro.


#11
var myStr = "I am a \"double quote\" string inside \"double quotes\"."; // Change this line

am still having problems with this same code, i have tried all that i was asked to do to get it right, both there shouldn’t be any spacing around the double quotes: yet it still not working out. Please am so confused and tired


#12

Your code is right.
You have a typo in your code.
This is what the challenge wants you to have:
I am a "double quoted" string inside "double quotes".

And this is what you have:
I am a "double quote" string inside "double quotes".

Can you spot the difference?


#13

Thanks it was a success