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

JavaScript Math.sin() Method

 JavaScript Math Object

Math.sin()The method returns the sine value of a number.

The Math.sin() method returns a sine value between-1and1between the numerical values, which represent the sine of the angle in radians.

Because sin() is a static method of Math, you should always use it asMath.sin(), rather than used as methods of the created Math object.

Syntax:

Math.sin(x)
Math.sin(0);   // 0
Math.sin(1);   // 0.8414709848078965
Math.sin(4);   // -0.7568024953079282
Math.sin(Math.PI); // 1.2246467991473532e-16
Math.sin(Math.PI / 2); // 1
Test See‹/›

Browser Compatibility

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

Method
Math.sin()YesYesYesYesYes

Parameter Value

ParameterDescription
xNumber

Technical Details

Return Value:Sine of a Given Number
JavaScript Version:ECMAScript 1

 JavaScript Math Object