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 trialArikaturika Tumojenko
8,897 Pointscorrect answer?
Can someone point out the correct answer for the second step of the chalenge (Assign your name (as a string) to the myName variable.)?
Thx!
4 Answers
Salman Akram
Courses Plus Student 40,065 PointsHi Silvia
It basically ask your name to assign ("=") as a String (for example- "Silvia") and then add semi-coma in the end. :)
Assign your name (as a string) to the myName variable.
var myName = "Silvia";
Chase Marchione
155,055 PointsTo assign your name as a string (a literal sequence of characters), you would use quotation marks to define the beginning and ending of the string.
The equals sign is the assignment operator, which indicates that you are assigning a value to the variable.
A semi-colon at the end of the statement indicates that your command is finished at the point it is used.
Example code (of course, you'd want to use your own name instead of 'firstname lastname':
var myName = "firstname lastname";
Arikaturika Tumojenko
8,897 PointsThank you for the answers, I tried that multiple times but I got an error. It means it's gotta be a problem with the workspace or something.
Salman Akram
Courses Plus Student 40,065 PointsIf that happened, one way is to refresh it repeatedly and type again. It will sort out everything after refresh or use different browser.
Chase Marchione
155,055 PointsA refresh might be all you need to do, though it is more than likely that it is some sort of temporary issue with the objective--this happens from time and time. Sometimes it takes minutes or even just seconds for the issue to be solved.
Jason Anello
Courses Plus Student 94,610 PointsHi Silvia,
What kind of error are you getting? I just tried the challenge and it's working correctly at this moment.
Arikaturika Tumojenko
8,897 PointsHey Jason Anello,
I switched to another browser and it worked in the end. Thx for the intervention :).