Help with Basic JavaScript: Concatenating Strings with Plus Operator

can anyone tell me why it says that i didnt use the + operator to build myStr .
when i actually did?
this is the line
var myStr= "This is the start. " + “This is the end.”;

[ update ] It is a bug…

Hi _yotam
You are using the wrong quotation marks. Try copying and pasting the below instead.
There is a subtle difference. You are using : \u201c (try googling it, it is a different character than the one e use to code. Maybe you are using a text editor instead of an ide?)
This will compile:

var myStr= "This is the start. " + "This is the end.";

Also it seems that the editor here by default uses the curly quotation marks… Need to use the code box…

Hi, I have the same issue and I used both types of quotation marks by using keyboard " and by alt + 0147 and alt + 0148. Is the IDE built in browser playing up?

so should i write stuff in for example visual studio code and then copy it to the site?
also the example you sent doesnt work. so i really cant see the problem

I think this is a bug see here.

1 Like