random Method Returns a pseudorandom number between 0 and 1.Math.random( ) Res The pseudorandom number generated is from 0 (inclusive) to 1 (exclusive), that is, the returned number can be zero, but it will always be less than one. The random number generator is seeded automatically when JScript is first loaded. sqrt Method Returns the square root of a number.Math.sqrt(number) The required number argument is a numeric expression.Res If number is negative, the return value is zero. round Method Returns a supplied numeric expression rounded to the nearest integer.Math.round(number) The required number argument is the value to be rounded to the nearest integer. ceil Method Returns the smallest integer greater than or equal to its numeric argument. Math.ceil(number) The required number argument is a numeric expression. pow Method Returns the value of a base expression taken to a specified power. Math.pow(base, exponent) Arguments baseRequired. The base value of the expression.exponentRequired. The exponent value of the expression.Example In the following example, a numeric expression equal to baseexponent returns 1000. Math.pow(10,3);
Returns a pseudorandom number between 0 and 1.Math.random( ) Res
The pseudorandom number generated is from 0 (inclusive) to 1 (exclusive), that is, the returned number can be zero, but it will always be less than one. The random number generator is seeded automatically when JScript is first loaded.
sqrt Method
Returns the square root of a number.Math.sqrt(number) The required number argument is a numeric expression.Res
If number is negative, the return value is zero.
round Method
Returns a supplied numeric expression rounded to the nearest integer.Math.round(number) The required number argument is the value to be rounded to the nearest integer.
ceil Method
Returns the smallest integer greater than or equal to its numeric argument. Math.ceil(number) The required number argument is a numeric expression.
pow Method
Returns the value of a base expression taken to a specified power. Math.pow(base, exponent) Arguments
baseRequired. The base value of the expression.exponentRequired. The exponent value of the expression.Example
In the following example, a numeric expression equal to baseexponent returns 1000. Math.pow(10,3);