Show Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JavaScript Define and Call a Function</title> </head> <body> <script> // Defining function function sayHello() { document.write("Hello, welcome to this website!"); } // Calling function sayHello(); // Prints: Hello, welcome to this website! </script> </body> </html>