If there is no digit after the decimal point, the number becomes an integer.
var floatNum = 1.;
document.writeln(floatNum); // an integer
If there is no digit after the decimal point, the number becomes an integer.
var floatNum = 1.;
document.writeln(floatNum); // an integer