Specifications

Returns a pseudo-random floating point number between
0 and 1. Pseudo random numbers are not truly random
random() : Number
but may be adequate for some applications such as simple
simulations.
Returns the number rounded to the nearest integer. If the
fractional part of the number is >= 0.5, the number is
rounded up; otherwise it is rounded down.
round( number : Number ) : Number
Returns the sine of the given number in radians. The value
will be in the range -1..1.
sin( number : Number ) : Number
If the number is >= 0, it returns the square root. If the
number is < 0, it returns NaN.
sqrt( number : Number ) : Number
Returns the tangent of the given number in radians.
tan( number : Number ) : Number
Built-in functions
JavaScript provides a number of convenient built-in constants, variables and functions.
The built-in constants include Infinity, NaN and undefined.
The built-in variables include arguments.
The built-in functions include eval(), isFinite(), isNaN(), parseFloat(), parseInt().
Built-in constants
This is the value of any division by zero, that is,
var i = 1/0;
In JavaScript, division by zero does not raise an exception; instead it assigns
the Infinity value as the result of the expression. Use isFinite() to test whether
a value is finite or not.
Infinity
Some functions that are supposed to return a numeric result may return NaN
instead. Use isNaN() to check for this.
NaN
This is the value of a variable that does not have a defined value, that is, has
not been assigned to.
var i;
undefined
// ...
if ( i == undefined ) {
i = 77;
}
In this example, if execution reaches the if statement and i has not been
assigned a value, it will be assigned the value 77.
388
Enfocus Switch 10