Write Your First JavaScript Program

Write Your First JavaScript Program

Please follow the below steps to produce your first javascript program

  • Open your editor
  • Click File >> New from the menu
  • Enter one of the below code
  • Save it as HelloWorld.html
  • Open the saved file within browser
  • Here we go your first program worked

On the following example it is used as outputing "Hello World" text

CODE

 

On the following example it is used as printing "Hello World" text to the console. You can open console in Chrome, Firefox and Edge with CTRL + SHIFT + I combination.

CODE