JavaScript(or JS) enables users to create interactive webpages and is an essential code to learn for websites and web applications. Most modern websites use JavaScript.
The JavaScript Reference serves as library to define various JS elements such as arrays, date, json, math, operators and regular expressions (regexp) to help you build your website.
JavaScript Math
JavaScript Math object allows developers to perform mathematical tasks.
For Example:
Math.floor(Math.random() * 10); // Generate a random number between 0 & 9 //
NAME
DESCRIPTION
CATEGORY
abs(x)
Returns the absolute value of x
Methods
acos(x)
Returns the arccosine of x, in radians
Methods
acosh(x)
Returns the hyperbolic arccosine of x
Methods
asin(x)
Returns the arcsine of x, in radians
Methods
asinh(x)
Returns the hyperbolic arcsine of x
Methods
atan(x)
Returns the arctangent of x as a numeric value between -PI/2 and PI/2 radians
Methods
atan2(y, x)
Returns the arctangent of the quotient of its arguments