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.sqrt(49);
</script>

What will be the output of the following JavaScript code?
<p id=”demo”></p>
<script>
document.getElementById(“demo”).innerHTML = Math.sqrt(49);
</script>
a) 6
b) 7
c) 49
d) error

Answer: b
Explanation: Math.sqrt function returns the square root of the argument passed to it. It is found in the math library of Javascript.

Join The Discussion