Exercise:
Display the square root of "9".
Hint
Hint: Use the sqrt() method.
Edit This Code:
See Result »
<!DOCTYPE html> <html> <body> <p id="demo">Display the result here.</p> <script> // Insert the Math method here </script> </body> </html>
Result:
Show Answer
Correct Code:
<!DOCTYPE html> <html> <body> <p id="demo">Display the result here.</p> <script> document.getElementById("demo").innerHTML = Math.sqrt(9); </script> </body> </html>
Correct Result:
Hide Answer
Privacy Policy