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 trialRajesh Panda
Full Stack JavaScript Techdegree Student 120 PointsWhy do number don't use quotes ?
Numbers don't use quotes as other words do to form a string
2 Answers
Noman Rafiq
Full Stack JavaScript Techdegree Student 13,106 PointsHey rajesh. This might not be the answer you are looking for. But I will try a simple approach as I learned at first. If you put number in quotes that is treated as string "35" and to tell the compiler and process is as number you will use 35. so 35 and "35" and not equal, one is number and one is string. Anything used inside the quotes is string or character or sentence. anything you need to do calculations on is number and goes without quotes.
Courage Ngonidzaishe Moyosvi
28,998 Pointsi will try a different approach to explain it the console reads information about variables using their data types and each data type has a different type of syntax for example in this case when creating a string variable we need to surround the value of the variable using quotes however for number data types or integers we do not use quotes