how to save javascript file in notepad

Save javascript file in notepad:
Introduction: I am going to explain, "how to save javascript file in notepad" and what will be the extension of javascript file Extension. Here is the step by step process to save js file in notepad.
$ads={1}
1.Open Notepad by pressing Window+R from your PC

how to save javascript file in notepad



2. Write a program of javaScript.

hellow world program in  javascript with notepad


3. Press ctrl+S to save the file in your system.
4. After pressing ctrl+S it will ask for the name of your file.
5. Give a name of the file with .JS extension i.e.  "hello.js".


how to use javascript file in notepad

$ads={2}

FAQ

Q.1  What is an extension of the javascript file?
Ans  .js

Q2.  How to run the javascript file?
Ans: There is several methods to run javascript file

  •         By the command prompt.
  •         By linking in HTML file.

Run javascript by command prompt

Step 1: Open command prompt
Step 2: Find the path where the javascript file is saved
Step 3: To run javascript type node hello.js  in command prompt.


Run javascript by linking in HTML file

Step 1: Link javascript file in <head> tag of HTML File by the following script tag.
<script type="text/javascript" src="path-of-hello.js"></script>
Step 2: Save HTML file and view in browser


Thanks for reading the post, If you have any question feel free to comment below.  

Post a Comment

Post a Comment (0)

Previous Post Next Post