
Math.sin() Method is used to return the sine of a number. This method return a value between -1 and 1 which represent the sine of the parameter x.
Syntax
Math.sin(x)
Example:
<script>
var one = Math.sin(90);
document.writeln('Output of 90 : ' + one + '</br></br>');
var two = Math.sin(0);
document.writeln('Output of 0 : ' + two + '</br></br>');
var three = Math.sin(-1);
document.writeln('Output of -1 : ' + three + '</br></br>');
var four = Math.sin(Math.PI);
document.writeln('Output ofMath.PI : ' + four + '</br></br>');
</script>Output:
Output of 90 : 0.8939966636005579 Output of 0 : 0 Output of -1 : -0.8414709848078965 Output ofMath.PI : 1.2246467991473532e-16