In this tutorial, I am going to share a basic JavaScript script to print the Hello World Script in JavaScript is a platform-independent script. This is an example of a hello world script in javascript.
Below is the example to display an alert message when you run this script.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | <!DOCTYPE HTML> <html> <body> <p>Before the script...</p> <script> alert( 'Hello world!' ); </script> <p>...After the script.</p> </body> </html> |
If you like FreeWebMentor and you would like to contribute, you can write an article and mail your article to [email protected] Your article will appear on the FreeWebMentor main page and help other developers.
Article Tags: Hello World Script in JavaScript, java tutorials with examples, javascript tutorials