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 trialJorge Estrada
4,780 PointsQuestion regarding the "Reviewing JavaScript Variables Quiz".
I'm confused as to this question on the quiz:
Complete the code below to store the value 100 in the variable name score
var score =
From this example, how are we supposed to know what type of JavaScript value to input? Numbers, Strings, Booleans, etc.
3 Answers
Nejc Vukovic
Full Stack JavaScript Techdegree Graduate 51,574 PointsHi Jorge,
The good thing about JavaScript it's smart. It distiguieshes if a input for the variable a string ( 'this is a string') or an Integer ( 123 ).
But word of advice : if the challange says you have to input 100 then you have to put in a number -> if it said '100' then you have to put in '100' (which is a string).
Tiffany McAllister
25,806 PointsA score would be a number data type because it would need to be able to be manipulated using math operations.
var score = 100;
Jorge Estrada
4,780 PointsThank you both!