JavaScript Number Reference

JavaScript Numbers JavaScript has only one type of number. Numbers can be written with, or without, decimals: Example var x = 3.14;     // A number with decimals var y = 34;       // A number without decimals Extra large or extra small numbers can be written with scientific (exponent) notation: Example var x = 123e5;    // 12300000 var y = 123e-5;   // 0.00123 For a tutorial about JavaScript […]

JavaScript Global Reference

The JavaScript global properties and functions can be used with all the built-in JavaScript objects. JavaScript Global Properties Property Description Infinity A numeric value that represents positive/negative infinity NaN The NaN property represents “Not-a-Number” value. This property indicates that a value is not a legal number. The NaN property is the same as the Number.Nan […]