JavaScript Tutorial





Español Français 中文 Deutsch Portuguese Japanese nederlands
   
 
Java-Script Tutorial
Introduction Introduction
Variables Variables
Operators Operators
Statements Statements
Loops Loops
Functions Functions
Objects Objects
Arrays Arrays
Cookies JS Cookies
Browser Objects Browser Objects
Form DOM Form DOM
Style Objects DOM Style Objects
Forums Ask Your Doubts
Scraps More about Javascript
Feedback Feedback
 




Math.tan()Function


Tutorials Javascript

Topic

Math.tan() method in Javascript.
How to calculate the tangent value of an angle in javascript?



Explanation

Math Function:

Object: Math

Method: Math.tan()

Description:To calculate the tangent value for an angle, use this function. For example lets try to get tan values for the angles 60,45.

Example to calculate tan value:
<script type="text/javascript">
document.write('Tangent value of 60 degrees is::'+Math.tan(60));
document.write('</br>');
document.write('Tangent value of 45 degrees is::'+Math.tan(45));
</script>

Result:


In the above example,
  • Math.tan() method returns a tan value for 60 degrees "0.32004".
  • The tan value for the "45" degrees is "1.61977".






  • A Note
    Javascript (JS) is one of the most used languages in the world. Some times spelled as Java Script. Hope you enjoy this tutorial. Do send your feedback or suggestions on this javascript or java script tutorial. This is a copyright content.

    Other Links

    web hosting