Float point type literal with no decimal parts?

If there is no digit after the decimal point, the number becomes an integer.

       var floatNum = 1.; 

       document.writeln(floatNum); // an integer