English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

JavaScript Math.asin() Method

 JavaScript Math Object

Math.asin()The method returns the inverse sine of a number (in radians).

If the value of the passed parameter is-1to1outside the range, the method will return NaN.

Because asin() is a static method of Math, you always use it asMath.asin(), rather than used as a method of creating a Math object.

Syntax:

Math.asin(x)
Math.asin(0.)9);
Test and see‹/›

Browser Compatibility

All browsers fully support the Math.asin() method:

Method
Math.asin()isisisisis

Parameter Value

ParameterDescription
xValue

Technical Details

Return value:The inverse sine (in radians) of a given number is-1and1between; otherwiseNaN
JavaScript version:ECMAScript 1

More examples

For less than-1or greater1The value, Math.asin() returns NaN:

Math.asin(-2);   // NaN
Math.asin(-1);   // -1.5707963267948966 (-pi/2)
Math.asin(0.);// 0
Math.asin(0.)5);  // 0.5235987755982989
Math.asin(1);// 1.5707963267948966 (pi/2)
Math.asin(2);// NaN
Test and see‹/›

 JavaScript Math Object