DEV Community

Discussion on: Beginning JavaScript - Variables and Primitive Data Types

timmybytes profile image
Timothy Merritt Author

I think that’s one of the tough things to wrap your head around with a loosely-typed language like JavaScript. They can be greatly beneficial because of their variability, but sometimes defining things can get abstract.

I would just say “a JavaScript number is a wrapper for a numeric value, whether it’s an integer, float, etc., within the scope of available precision.”

alekseiberezkin profile image
Aleksei Berezkin

Yes, the dynamic nature of JavaScript can make one feel that everything is just wrapper of whatever 🙂 However, if we are talking of number-the-primitive, it's always floating-point double precision number, known as double in C and Java.