Exercise:
Use the function to display the product of 5 * 5.
Hint
Hint: Use the return statement.
Edit This Code:
See Result »
<!DOCTYPE html> <html> <body> <p id="demo"></p> <script> function myFunction() { // Add code here } document.getElementById("demo").innerHTML = myFunction(); </script> </body> </html>
Result:
Show Answer
Correct Code:
<!DOCTYPE html> <html> <body> <p id="demo"></p> <script> function myFunction() { return 5 * 5; } document.getElementById("demo").innerHTML = myFunction(); </script> </body> </html>
Correct Result:
Hide Answer
Privacy Policy