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

Challenge Task 2 of 2 Create a variable named "mevol" and assign the value 16 to it using an octal n

Challenge Task 2 of 2

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

index.html
<!DOCTYPE html>
<html lang="en">
  <head>
    <title> JavaScript Foundations: Creating Numbers</title>
    <link rel="stylesheet" href="core.css">
    <script>
      // exponential notation
      //    1E6 === 1000000
      // 1.23E6 === 1230000

      // octal number literals
      //  06 ===  6
      //  07 ===  7 
      // 010 ===  8
      // 011 ===  9
      // 012 === 10
      var GermanyGDP = 34E11;
      var mevol = 018;

    </script>
  </head>
  <body>
    <h1>JavaScript Foundations</h1>
    <h2>Creating Numbers: Part 2</h2>
    <script src="viewer.js"></script>
  </body>
</html>

2 Answers

hello ,

doesn't it should be ?

var mevol = 020;

Hope this will help

THAT is Correct Good Sir.