MSK Institute LogoMSK.Institute
HomeCourses
Book Free Demo➔Sign In
Free Demo➔
MSK Institute LogoMSK.Institute

Leading computer training academy in Shikohabad for software engineering, Python, web development, and digital literacy.

ISO 9001:2015 Certified Center
Follow & Connect
4.9

Programs & Admissions

  • All CoursesCatalog
  • Learning PathsRoadmaps
  • Student ProjectsShowcase
  • Live Classes & ScheduleLive
  • Upcoming Batches
  • Campuses & LocationsHub
  • Verify Certificates
  • Book Free Demo Class

Resources & Tools

  • Free Online Mock TestsAll Tests
  • NIELIT CCC Mock TestFree
  • Course & Career FinderQuiz
  • Study Material Hub
  • All MSK ToolsHub
  • Keyboard ShortcutsNew
  • TypeQuest Speed LabTyping
  • MSK Code PlaygroundCode
  • Interactive Tutorials
  • Quick Cheatsheets

Institute & Contact

  • About MSK Institute
  • Careers & InternshipsHiring
  • Publications & Blogs
  • Gali No. 3, Near Gyan Jyoti Public School,
    Adarsh Nagar, Shikohabad, Uttar Pradesh 283135
  • +91 83930 42166
  • mskshikohabad@gmail.com
  • Hours:Mon – Sat: 8:00 AM – 7:00 PM | Sun: 10:00 AM – 2:00 PM
  • 4.9 ★(38 Google Reviews)
© 2026 MSK Institute. All rights reserved.•Privacy Policy•Terms of Service•Disclaimer•Contact Us

Shikohabad's Leading Computer & Coding Academy

Home
Courses
Live
Material
Setting up Environment: VSCode, Live Server0%
Study Materials
JavaScript for BeginnersProgress 0%
1.1What is JavaScript?1.2How JavaScript Works in Browser1.3Setting up Environment: VSCode, Live Server
HomeTutorialsJavaScript for BeginnersSetting up Environment: VSCode, Live Server
Variables: var, let, const

Setting up Environment: VSCode, Live Server

Beginner12 min read•Updated: 2026-09-15•By Er. Sumit Kumar (MSK Institute)
Study Materials

To write JavaScript productively, professional developers configure a modern development environment. While you can write code in Notepad, using industry-standard tools like Visual Studio Code (VS Code) and the Live Server extension accelerates your learning and debugging tenfold.


1. Installing Visual Studio Code

Visual Studio Code (VS Code) is the world's most popular free code editor, built by Microsoft using web technologies (Electron, TypeScript, and Node.js).

Step-by-Step Installation:

  1. 1
    Navigate to code.visualstudio.com.
  2. 2
    Download the installer for your operating system (Windows, macOS, or Linux).
  3. 3
    Run the installer. On Windows, ensure you check:
  • Add "Open with Code" action to Windows Explorer file context menu.
  • Add to PATH.
  1. 1
    Launch VS Code.

2. Essential Extensions for JavaScript Developers

In VS Code, click the Extensions icon in the left sidebar (or press Ctrl + Shift + X on Windows / Cmd + Shift + X on Mac). Install the following extensions:

Visual Architecture & Process Flow

How data and code flow step-by-step

Flowchart
Step 1
| Accelerates typing with quick snippets (clg
Step 2
console.log) |

3. Creating Your First Project with Live Server

Let's set up a clean, structured project folder:

Step 1: Create Project Folder

On your desktop or projects directory, create a folder named js-starter:

1js-starter/
2├── index.html
3├── style.css
4└── app.js

Step 2: Write the HTML Boilerplate (index.html)

In VS Code, open index.html and type ! followed by Tab to generate HTML5 boilerplate:

1<!DOCTYPE html>
2<html lang="en">
3<head>
4 <meta charset="UTF-8">
5 <meta name="viewport" content="width=device-width, initial-scale=1.0">
6 <title>JavaScript Starter | MSK Institute</title>
7 <link rel="stylesheet" href="style.css">
8 <script src="app.js" defer></script>
9</head>
10<body>
11 <div class="container">
12 <h1 id="heading">Welcome to JavaScript!</h1>
13 <button id="btn">Click to Test JS</button>
14 <p id="output"></p>
15 </div>
16</body>
17</html>

Step 3: Write Your JavaScript Code (app.js)

1console.log("app.js loaded successfully!");
2 
3const btn = document.getElementById("btn");
4const output = document.getElementById("output");
5 
6btn.addEventListener("click", () => {
7 output.textContent = "Congratulations! JavaScript is working perfectly.";
8 output.style.color = "#10b981";
9 output.style.fontWeight = "bold";
10});

Step 4: Launch Live Server

  1. 1
    Right-click inside index.html.
  2. 2
    Select Open with Live Server (or click "Go Live" in the bottom-right status bar).
  3. 3
    A browser window automatically opens at http://127.0.0.1:5500/index.html.
  4. 4
    Click the button and watch the text update instantly!
  5. 5
    Change any text in VS Code and press Ctrl + S: the browser reloads automatically without manual refresh!

4. Configuring Prettier "Format on Save"

To ensure your code always looks clean and professionally formatted:

  1. 1
    Open VS Code Settings (Ctrl + ,).
  2. 2
    Search for Format On Save.
  3. 3
    Check the checkbox: Editor: Format On Save.
  4. 4
    Set Editor: Default Formatter to Prettier - Code Formatter.

Interactive Quiz• Knowledge Check

Practice Quiz

Question 1
What is Visual Studio Code (VS Code)?
Question 2
What is the primary benefit of the "Live Server" extension in VS Code?
Question 3
Why is testing JavaScript via http://127.0.0.1:5500 (HTTP protocol) better than double-clicking index.html (file:// protocol)?
Question 4
Which VS Code extension automatically enforces consistent indentation, quotation marks, and line breaks on save?
Question 5
What is the shortcut in VS Code to quickly open the Integrated Terminal?
Next Lesson

Variables: var, let, const

Continue learning with hands-on practice, examples, and exercises in the upcoming topic.

Related Lessons

Previous LessonNext Lesson
How JavaScript Works in BrowserVariables: var, let, const

Practice Quiz

Test your understanding of this lesson with 5 questions. Each question has one correct answer.

Mentor-Led Practical Training

Master JavaScript for Beginners with Hands-On Projects

Practice in live mentor-led sessions with real projects, mock tests, and verifiable certification at MSK Institute.

View Full CourseBook Free Demo
PreviousNext
PreviousPrevNext