Numbers don't have "trailing zeros" - they aren't even stored as decimal values but in binary instead to the whole concept of "6 decimal places" doesn't actually work! You cannot "force" a number to have a certain number of decimal places except when you convert it to a string using the
JavaScript toFixed() Method[
^] as you have seen.
Basically, when you want to print a number - any number - it gets converted to a string, and that's when you specify how many decimal places it should have.