# Introduction JavaScript Math.Asin() Function with Examples In JavaScript, asin() is a function that is used to return the arc sine of a number, with the result expressed in radians. Because the asin() function is a static function of the Math object, it must be invoked through the placeholder object called Math.

In JavaScript, asin() is a function that is used to return the arc sine of a number, with the result expressed in radians. Because the asin() function is a static function of the Math object, it must be invoked through the placeholder object called Math.

### Syntax:

``````Math.asin(p)
``````

### Parameter(s):

• p - lying between -1 and 1 whose arcsine value is to be determined.

### Return value:

The asin() function returns the arc sine of a number and the result is expressed in radians.

If the number is not within the range of -1 and 1, the asin() function will return NaN.

### Browser Support:

• Internet Explorer
• Firefox
• Opera
• Safari
• Opera for Android
• Safari on iOS
• Samsung Internet
• Android webview
• Chrome for Android
• Firefox for Android
• Node.js

## Math.Asin() Method with Example

### Example 1

Let's take a look at an example of how to use the asin() function in JavaScript.

``````
console.log(Math.asin(0.75));
console.log(Math.asin(-0.9));
console.log(Math.asin(2));
``````

Output

``````0.848062078981481
-1.1197695149986342
NaN
``````
• In this example, the first output to the console log returned 0.848062078981481 which is the arc sine of 0.75.
• The second output to the console log returned -1.1197695149986342 which is the arc sine of -0.9.
• The third output to the console log returned NaN since the number was not within the range of 1 and -1.

The result from the asin() function is expressed in radians.

### Example 2

The following example demonstrates the case where values outside the range of [-1,1] are passed as parameters.

``````var a = 2;
var b = -2;

console.log(Math.asin(a));
console.log(Math.asin(b));
``````

Output

``````NaN
NaN
``````

The JavaScript math asin() method returns the arcsine of the given number in the form of radians. The asin() method must be in the range -1 to 1, otherwise it returns NaN. Thanks for reading !

## Top Vue.js Developers in USA

Vue.js is an extensively popular JavaScript framework with which you can create powerful as well as interactive interfaces. Vue.js is the best framework when it comes to building a single web and mobile apps.