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 trialNthulane Makgato
Courses Plus Student 19,602 PointsStruggling to complete JavaScript numbers challenge.
Hi Guys,
I'm doing a challenge while learning javascript numbers. I'm certain that the answer is very simple though even though I have been racking my head for a while now.
The challenge is, "Create a variable named 'mevol' and assign the value 16 to it using an octal number literal."
I type in "var mevol = 01206" and the response that I get back is: "Bummer! Please try again. Correct octal literals are declared like: <code>var o = 021;</code>"
I have placed my answer in between the <script></script> tags which is the space provided to complete the challenge in HTML.
Any input will be appreciated.
2 Answers
Stone Preston
42,016 Pointsthe octal value for 16 is 020, not 01206.
Nthulane Makgato
Courses Plus Student 19,602 PointsYou're right, thanks for your prompt response. I really appreciate it.
Stone Preston
42,016 Pointsno problem : )