I am stuck at this code,help

I am stuck at this code,help
0

#1

what is wrong with

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

#2

I am seeing curly double quotes ( “ and ”) instead of straight double quotes (" and ") used in your solution. You should be using straight double quotes.


#3

still not working

var myStr = “I am a “double quoted” string inside “double quotes”.” ;

#4

I’ve edited your post for readability. When you enter a code block into the forum, precede it with a line of three backticks and follow it with a 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.


#5
var myStr=“I am a\ “double quoted” string inside “double quotes\”.”;

#6

what is wrong?

var myStr="I am a"double quoted" string inside"double quotes".";

#7

Can you edit your posts with the 3 backticks as shown to you by @nsuchy? Both of your new solutions are using the curly double quotes so they are causing come of your problems. Also, both new solutions above have spaces in the wrong location. On the second new solution you posted above, you are missing the escape character before the double quotes (these are curly quotes but should be straight).

You should put a console.log(myStr); after the myStr assignment and then look at your browser’s console (Ctrl+Shft+J in Chome) to see what myStr actually looks like. Then you can see the spacing issues better.


#8

is Mac edit will different with ?


#9

What browser are you using? If using Chrome on Mac, then Command+Option+J opens the console for viewing. If your code has any of those curly double quotes, it will probably result in an error shown in your console.


#10

is Safari? I have to change it?


#11

FreeCodeCamp.org challenges work best on Chrome.

The following link explains how to set up developer tools on Safari.

https://ggnome.com/wiki/Using_The_Browser_Error_Console


#12

OK,thank you so much!


#13

now?

var myStr="I am a\"double quoted\"string inside\"double quotes\".";

#14

When you enter a code block into the forum, precede it with a line of three backticks and follow it with a 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.

I formatted your code again. Please follow the above directions when pasting code into the forum. Otherwise, even if you have the straight double quotes, they appear as curly quotes You still have curly quotes showing, but I do not know if you put them there or the forum turned straight quotes into curly quotes. Also, you still are missing a space between certain words. The following is what myStr contains after your code runs.

I am a"double quoted"string inside"double quotes".

See the spaces missing between certain words an the double quotes?


#15

finally,got it,space…


#16

I’ve edited your previous few posts for readability. When you enter a code block into the forum, precede it with a line of three backticks and follow it with a 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.