Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

What will be the output of the following JavaScript code?
<p id=”demo”></p>
<script>
document.getElementById(“demo”).innerHTML = Math.sin(90 * Math.PI / 180);
</script>

What will be the output of the following JavaScript code?
<p id=”demo”></p>
<script>
document.getElementById(“demo”).innerHTML = Math.sin(90 * Math.PI / 180);
</script>
a) 1
b) 0
c) 1.6
d) 0.5

Answer: a
Explanation: Math.sin function evaluates the sine value of a particular input. Math.PI function generates a value of 3.14.

Join The Discussion