Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialdavide totaro
5,559 PointsComplete the code below to create a new variable named message containing the string "JavaScript"
???
7 Answers
Jonathan Grieve
Treehouse Moderator 91,253 PointsRight, I've seen the question and I've seen why your attempt isn't working.
The question is using concatenation in it's example so it's done the "Script" part of the value for you. but you also need to include the quotes for the string so it's more like
var message = "Java" + "Script"
where the text you want to type is message and "Java".
Jonathan Grieve
Treehouse Moderator 91,253 PointsWithout seeing the question itself
I would hazard an educated guess the code you want is
var message = "JavaScript";
davide totaro
5,559 Pointsok thanks so much for your time
Jonathan Grieve
Treehouse Moderator 91,253 PointsYou're welcome! :)
Stephen Sanchez
Courses Plus Student 843 PointsIt's just "Java"
davide totaro
5,559 Pointsit doesn't works, i don t know why
Marco Ramos
4,638 PointsRemember: Since it's a string you are adding don't forget the quotes, to the word 'Java' and you have to stick to the same type TreeHouse shows on the example, TeamTreeHouse tends to be a case sensitive platform as for my experience. The only way it worked for me was when I used: 'Java'
virginiachubo3
8,963 Pointsvar message= "Java" + 'script'; . I worked for me
Spencer Schaus
9,628 PointsAnyone else have trouble with this one? It looks incredibly simple, but I keep getting it wrong.
I initially entered 'Java' and got it wrong. Then I just entered Java by itself with no quote marks and got it wrong again.
THEN knowing it wouldn't work for any reason, I entered in 'Java'; with the semi-colon just see what would happen and sure enough, wrong again.
I have not tried "Java" with double quotes yet. If that appears to be the right answer, can someone explain why double quotes is the right answer over single quotes? Felt like JS ignored that rule when concatenating.
Kingsley Felix
8,591 PointsKingsley Felix
8,591 Pointsthanks