β‘ Quick Summary:
-
β JavaScript runs in your browser (no installation needed).
-
β But you can use VS Code to write, save, and manage your files.
-
β You only need a browser and a code editor to start.
π§βπ» Step-by-Step: Set Up JavaScript
β Step 1: Install VS Code (if not already)
Already done earlier, but just in case:
-
Download from π https://code.visualstudio.com
-
Install like a regular app (check “Add to PATH” during setup)
β Step 2: Create Your First JavaScript File
-
Open VS Code
-
Go to File > New File
-
Save it as:
πindex.html
-
Paste this code:
-
Right-click the file in VS Code and choose “Open with Live Server” (or open it manually in your browser).
π‘ If you donβt have Live Server, install it from VS Code Extensions (
Ctrl+Shift+X
, search: Live Server)
β Step 3: Check Output
-
A popup should say: βHello from JavaScript!β
-
Right-click on the page > Inspect > Console tab β youβll see:
π Boom! You just ran JavaScript in your browser.
π§ͺ Bonus: Run JavaScript Directly in Browser Console
-
Open any browser (Chrome, Edge, Firefox)
-
Press
F12
to open Developer Tools -
Go to the Console tab
-
Type:
Hit Enter β it works instantly!
π§° Recommended Tools for JavaScript Coding
Tool | Purpose |
---|---|
VS Code | Code editor |
Live Server | Auto-reloads browser preview |
Chrome/Firefox | Best for testing JavaScript |
Node.js | (Optional) Run JS outside browser (next level) |