Easy Tutorial
❮ Prop Style Textindent Prop Style Position ❯

JavaScript sin() Method

JavaScript Math Object

Example

Return the sine of a number:

Output result:


Definition and Usage

The sine of the parameter x.

Note: The return value is between -1.0 and 1.0.


Browser Support

All major browsers support the sin() method.


Syntax

Parameter Values

Parameter Description
x Required. An angle expressed in radians. Multiply the angle by 0.017453293 (2PI/360) to convert it to radians.

Return Value

Type Description
Number The sine of the parameter x. The return value is between -1.0 and 1.0.

Technical Details

| JavaScript Version: | 1.0 | | --- | --- |


More Examples

Example

In this example, we will return the sine of different numbers:

a, b, c, d, and e Output result:


JavaScript Math Object

❮ Prop Style Textindent Prop Style Position ❯