Tryit Editor v1.4

<html> <head> <script type="text/javascript"> function myFunction() { return ("Hello, have a nice day!"); } </script> </head> <body> <script type="text/javascript"> document.write(myFunction()) </script> <p>The script in the body section calls a function.</p> <p>The function returns a text.</p> </body> </html> | Your Result:
Edit the code above and click to see the result. | W3Schools.com - Try it yourself