JavaScript(JS) math method - sin

The sin method in JavaScript's Math object returns the sine of a given angle, in radians. The sin method takes one argument, which is the angle in radians.

Here's an example usage:

const angleInRadians = Math.PI / 2;
const sine = Math.sin(angleInRadians);
console.log(sine); // 1
S‮ww:ecruo‬w.theitroad.com

In the above example, the Math.sin method is used to calculate the sine of the angle π/2 radians (which is equivalent to 90 degrees). The result, which is 1, is then logged to the console.