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

Help!

Create a variable named "mevol" and assign the value 16 to it using an octal number literal. <script> // exponential notation // 1E6 === 1000000 // 1.23E6 === 1230000

  // octal number literals
  //  06 ===  6
  //  07 ===  7 
  // 010 ===  8
  // 011 ===  9
  // 012 === 10
  var GermanyGDP = 3.4E12;
  var mevol = 016;



</script>

When I try: var mevol = 017 I get 15 and when I try: var mevol = 018 I get 18. Please help me!

1 Answer

Remember that the each column of digits can't exceed 7. Every time an 8 roles around the next column up gets a 1 and the first column is set to 0 again.

So for 17, for instance, 8 goes into 17 two times with 1 left every so 021 is the octal number literal.