• Register
100 points
7 4

HTML is used to design the structure of a webpage like the human bone structure, but javascript is used to enhance the webpage. For example figuring out if someone has filed the form, calculating values from the data given by the user, or making decisions. This article discusses the method of creating a javascript program in notepad.

How do I run a javascript file in notepad?

Actually the question is wrong. We cannot run any javascript program in notepad since notepad is a text editor. If we want to run a javascript file, we have to use any browser’s console. Although we can use notepad to write our program. 

How to use notepad for javascript program?

We can write html programs in notepad. And we use html’s <script> tag to add javascript to our webpage. Every web browser is built to understand javascript code. The thing that understands and executes javascript code is called javascript interpreter. 
The <script> tag tells browser to use javascript interpreter and browser executes javascript code and do amazing things.


  • Open notepad
  • Write your code
  • Save your code with html or htm extension
  • Run your code in any browser
All the code given above is html code but the <script> tag tells the browser to use javascript interpreter and the </script> tells that the javascript code has ended.
100 points
7 4