Standard built-ins

Math.sin()

Try the free JavaScript compiler

Sine of an angle measured in radians. Infinite angles yield NaN; finite nontrivial values are implementation-approximated. Converts x to Number; BigInt conversion throws TypeError.

Formal Syntax & Structure

javascript syntaxjavascript
Math.sin(x)

Parameters & Attributes

NameTypeDescription
xnumberNumber input or value coercible to Number.

Return Value

number

Result of the numerical operation, possibly NaN.

Working Example

Example Snippetjavascript
console.log(Math.sin(0));
JavaScript Reference