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 Basics (Retired) Working With Numbers Numbers

Ross Horak
Ross Horak
20,890 Points

Is Scientific Notation a data type?

As I understand it Integers and Floating Point numbers are 2 different data types. Is scientific notation considered a data type too?

Can a scientific notation number for example be divided by an Integer or Floating point number?

Ross Horak
Ross Horak
20,890 Points

Upon further research and reading on the MDN I found that JavaScript only has 1 data type for numbers, namely floating point numbers. And it states that 'There are no specific type for Integers.' Would this mean that numbers that appear to be integers in JavaScript are actually floating point numbers?

1 Answer

Seth Kroger
Seth Kroger
56,413 Points

Scientific notation is a way to write out a number, but not a specific data type on its own. So 3.6e+3 would be the same as 3600, just different ways of writing the same thing.

Ross Horak
Ross Horak
20,890 Points

Thanks for your clarification Seth.