Math.sin() function returns the sine of a number.
The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
- A number (given in radians).
The sine of the given number.
Math.sin() method returns a numeric value between -1 and 1, which
represents the sine of the angle given in radians.
sin() is a static method of
Math, you always use it
Math.sin(), rather than as a method of a
Math object you
Math is not a constructor).
Math.sin(0); // 0 Math.sin(1); // 0.8414709848078965 Math.sin(Math.PI / 2); // 1
BCD tables only load in the browser