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 trialDavid Brophy
4,238 PointsJavaScript Variable
It says:
Complete the code below to store the value 100 in the variable named score
var score =
I tried writing "100" but it says that's wrong. It doesn't tell me what the right answer is so can someone let me know?
2 Answers
Luke Pettway
16,593 PointsWhen you have the number in quotes it becomes a string, think of that as a text value. The value of '100' is not the same as 100, which is an integer.
Luke Pettway
16,593 PointsAre you putting 100 between quotes? Try it without them.
David Brophy
4,238 PointsThanks, that worked. But why don't I need the quotes? All the examples so far seem to use them.