JavaScript Math.asin()
Examples
let x = Math.asin(-1);
Try it Yourself »
let x = Math.asin(0);
Try it Yourself »
let x = Math.asin(1);
Try it Yourself »
Description
The Math.asin()
method returns the arcsine (in radians) of a number.
The Math.asin()
method returns a value between -PI/2 and PI/2.
The Math.asin()
method expects a parameter in the range -1 to 1.
Math.asin(-1)
returns -PI/2.
Math.asin(0)
returns 0.
Math.asin(1)
returns PI/2.
JavaScript Sine and Cosine Methods:
The Math.sin() MethodThe Math.sinh() Method
The Math.asin() Method
The Math.asinh() Method
The Math.cos() Method
The Math.cosh() Method
The Math.acos() Method
The Math.acosh() Method
Syntax
Math.asin(x)
Parameters
Parameter | Description |
x | Required. A number. |
Return Value
Type | Description |
Number | -PI/2 to PI/2.NaN if the parameter is not numeric or outside the range of -1 to 1. |
Browser Support
Math.asin()
is an ECMAScript1 (ES1) feature.
ES1 (JavaScript 1997) is fully supported in all browsers:
Chrome | Edge | Firefox | Safari | Opera | IE |
Yes | Yes | Yes | Yes | Yes | Yes |