That’s how it works with the current sizes for integers and doubles. About 20 years ago, integers were typically 2 bytes, and double 4 bytes. Your code should never have to depend on what is at this moment the size of the basic data types.
How JavaScript works: memory management + how to handle 4 common memory leaks
Alexander Zlatkov
12.7K49

I’m a big fan of using explicit sizes such as with uint8_t. It signals that you’ve thought of how large your variable values are going to get.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.