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 trial

JavaScript JavaScript Foundations Numbers Creating Numbers: Part 2

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,252 Points

Think this might be a bug, or else I don't understand Octal notaton yet. :)

I'm having trouble getting passed the second question in this challenge. It wants the value 16 in octal number notation.

Create a variable named "mevol" and assign the value 16 to it using an octal number literal.

I try

var mevol = 018;

But it comes up with

Bummer: octal notation is written like this var o = 021

I'm sure I'm doing it right, but I'm out of ideas as to what might be going wrong. Any thoughts?

2 Answers

Andrew Dunn
Andrew Dunn
14,718 Points

This one's pretty quick .... base 10 ends with 9... so obviously base 8 ends with.... 7!

If I haven't lost my mind yet, I believe the number you're looking for is 020

Jonathan Grieve
Jonathan Grieve
Treehouse Moderator 91,252 Points

Yup, that's the one thank you! :)

Think I just need a bit of extra time on the numbers video to get octal numbers in the brain.

Jonathan Grieve
Jonathan Grieve
Treehouse Moderator 91,252 Points

Looking back at Octals again I could easily have worked out the answer with the club written in the comments haha But Octal numbers still confuse me. Probably best avoiding them altogether?

Andrew Dunn
Andrew Dunn
14,718 Points

I rarely use them - I vaguely remember learning and hating them in computer science in high school. If you're working at the byte level they're probably more helpful than in raw web development.