What will be the output for the following code snippet?

What will be the output for the following code snippet?

< p id=“example”>


< script>
function Func ( )
{
document.getElementById(“example”).innerHTML=Math.sqrt(81);
}
< /script>
9

81

Error

0

1 Like

Answer is 9 The sqrt() method returns the square root of the passed parameter, which is in an inbuilt javascript function.