Problem with example in Hint in "It's All in the Genes."


#1

var num = 3;
var str = "The number is " + num!";

Doesn't work for me.

var num = 3;
var str = "The number is " + num + "!";

Does.


Possible errors in chapter hints in lessons 16 & 27
#2

the reason the second one worked is since you can't join a string and a variable together here you joined them:

But then the second one was correct since you serperated them :

Sorry if I'm not organized it's a pain to help on phone. Hope this helped!


#3

If you have a look at the two version than you see that the first one has an uneven number of " meaning this is a regular string:

"The number is "

which gets concatenated gets concatenated with a variable:

"The number is " + num

so far so good. And then out of no where a not operator appears and even worse a new string is started that is never closed.

In the second version you just concatenated another string to the existing one "!".