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.”
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.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
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.”
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 asdouble
in C and Java.