0 votes
in JavaScript by

What will be the correct output of the following JavaScript code?

<p id="demo"></p>  

<script>  

functionFunct()  

{  

document.getElementById("demo").innerHTML=Math.atan2(8,4);  

}  

</script>  
 

a) 1.01

b) 1.10

c) 1.05

d) 1.11

1 Answer

0 votes
by

Answer: B

Reason: The "atan2()" method used in the given code returns the arctangent of the quotient of its arguments, as the numeric values between -PI and PI radians. The returned digit represents the counterclockwise angle in radians (instead of degrees) between the positive X-axis and the point (x,y).

Related questions

0 votes
asked Mar 22, 2021 in JavaScript by Robindeniel
0 votes
asked Mar 24, 2021 in JavaScript by sharadyadav1986
...