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

Numbers Code Challenge

Trying to do this numbers challenge.

Using exponential notation, create a variable named "GermanyGDP" and assign the number 3.4 trillion (3400000000000) to it.

<script src="viewer.js"> </script>

I don't have a clue about that math language nor did they give any clues(that i noticed) in the lessons.

please help!

3 Answers

Nelson Mickey
Nelson Mickey
8,834 Points

It like scientific notation... but in java script its a little bit diffrent...

so one million 1,000,000 would be 1E6; because there are six spaces after the first number.

var GermanyGDP = 1E6;

So do the same with 3.4 trillion (3400000000000) = 3.4E?

Thanks for the support Nelson, i needed someone to explain that two me.

var GermanyGDP = 34E11