JavaScript Math sin() methodThe JavaScript math sin() method returns the sine of the given number. The value returned by sin() method ranges between -1 to 1, which represents the sine of the angle. SyntaxThe sin() method is represented by the following syntax: Parameternum - A number. ReturnThe sine of the number. JavaScript Math sin() method exampleHere, we will understand sin() method through various examples. Example 1Let's see a simple example of sin() method. Test it NowOutput: 0.8414709848078965 0.9092974268256817 Example 2In this example, we will use sin() method with negative numbers. Test it NowOutput: -0.8414709848078965 -0.479425538604203 Example 3Let's see sin() method with some different test cases. Test it NowOutput: 0 1.2246467991473532e-16 Example 4Here, you can test sin() method with your own test cases. Test it NowNext TopicJavaScript Math |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India