Here is the code:
document.write("The value of atan(2) is: "+Math.atan(2));
<h2>Use of atan() method</h2>
<button onclick="calculate();">Use of method atan</button>
Output will be displayed as:
On clicking the button, you will get the arc tangent of 2:
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.