In JavaScript, it is permissible to put an integer numeric literal with a period, for example ...
x = 5.;
What is the meaning of this designation? Is there a reason to put an end to the end, and if not, why is this designation allowed in the first place?
Update: Ok guys, as you mention float and integers ... We are talking about JavaScript here. JavaScript has only one type of number, which is IEEE-754.
5 and 5. have the same value, there is no difference between the two values.
javascript numbers literals
Ε ime Vidas
source share