Self-Taught Developer Journal, Day 22: TOP JavaScript Fundamentals Part 1 - Numbers

jennifertieu

Jennifer Tieu

Posted on December 22, 2021

Self-Taught Developer Journal, Day 22: TOP JavaScript Fundamentals Part 1 - Numbers

Today I learned...

JavaScript Numbers

JavaScript has only one kind of number and it can be written as a decimal or not. Then extra small or large numbers can be written with scientific (exponent) notation. I thought this was interesting because usually other programming languages, like python, have specific types of numbers (integer, float) while JS groups it as one type.

JavaScript Numbers are always 64-bit floating point or double precision floating point numbers.

Integers are accurate up to 15 digits and for decimals its 17 digits. It seems like the behavior after 15 digits is the number will round to the 15 digits and the digits after become 0.

Another short entry, but hoping to have more free time soon once I'm off work and after the holidays.

Resources

The Odin Project
https://www.w3schools.com/js/js_numbers.asp

💖 💪 🙅 🚩
jennifertieu
Jennifer Tieu

Posted on December 22, 2021

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related