A floating point notation or decimal number is not something explicitly declared. When the decimal point has nothing after the point, i.e., .0
It becomes an integer.
The .toFixed()
is just for aesthetic purposes only. It also helps you to rounds off to the number of decimals too.
2.50000
and 2.5
are the exact same number. If you want to keep trailing zeroes, you'll have to use a string.
When I try to do this on my Chrome Console:

You can see that even when you do a strict type-checking, the decimals are considered like comments by the JavaScript parser. It might be a bit unclear to understand for developers coming from statically typed or strongly typed languages like Java & C#, where you can have separate float and double types.
Related: JavaScript - Keep trailing zeroes.