Floating-Point Numbers : Float : Number Data Type JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Number Data Type » Float »

 

Floating-Point Numbers











Floating-point numbers can contain fractional parts.

Floating-point numbers can use exponential notation for added precision.

Floating-point numbers are made up of a decimal integer followed by a period (.) and the fractional portion of the number.

Exponential notation can be used by adding an e or E to the end of a floating-point number followed by a decimal integer that does not exceed 3 digits.

Use 1.0 not 1.








var fNum = 1.0;







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Number Data Type
» Float