JavaScript Math tan() methodThe JavaScript math tan() method returns the tangent of the given number that represents the tangent of an angle. SyntaxThe tan() method is represented by the following syntax: Parameternum - A number. ReturnA number that represents the tangent of the angle. JavaScript Math tan() method exampleHere, we will understand tan() method through various examples. Example 1Let's see a simple example of tan() method. Test it NowOutput: 1.5574077246549023 -2.185039863261519 Example 2In this example, we will use tan() method with negative numbers. Test it NowOutput: -1.5574077246549023 -0.5463024898437905 Example 3Let's see tan() method with some different test cases. Test it NowOutput: 0 -1.2246467991473532e-16 Example 4Here, you can test tan() method with your own test cases. Test it Now
Next TopicJavaScript Math
|
Javatpoint provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India