Setup: Node + npm, Running .js, DevTools Console
Install Node, verify versions, run .js files, learn npm basics, and practice with the browser DevTools console.
Setup: Node + npm, Running .js, DevTools Console is a free JavaScript Academy lesson on CoddyKit. This is lesson 2 of 3. Any 3 lessons of this learning path are free to read in full — after that, CoddyKit PRO unlocks every lesson, plus hands-on practice with a built-in code editor and a 24/7 AI tutor. It is part of the JavaScript Academy learning path, and your progress syncs across the web and the CoddyKit app. The JavaScript Academy course includes 3 lessons in total.
Intro
Goal: Set up Node and npm, run a .js file, and use the browser's DevTools Console.
- Install & verify Node
- npm basics
- Run .js files
- Use console tools
Verify Node & npm
Verify: In a terminal, run node -v and npm -v. If versions appear, your setup is ready.
Create & run a file
Create hello.js and run it with node hello.js.
// hello.js — minimal program to run with Node
function greet(name) {
return "Hello, " + name + "!";
}
const message = greet("CoddyKit");
console.log(message);
// Run from terminal in this folder: node hello.js
npm quickstart
Inside a project folder, run npm init -y to create package.json. Add a script: "start": "node hello.js". Then run npm run start.
Console tools
Use console.log, console.table, and console.time to inspect and measure small tasks.
// Basic console utilities that work in Node and browsers
const user = { name: "Ayla", level: 1 };
console.log("User:", user);
console.table([{ key: "name", value: user.name }, { key: "level", value: user.level }]);
console.time("work");
for (let i = 0; i < 100000; i++) {}
console.timeEnd("work");
console.warn("Heads up: demo complete.");
DevTools basics
Open DevTools (F12 or right-click → Inspect) and switch to Console. Paste small snippets, press Enter, and read the output. Tip: clear with clear().
Node version quiz
Quick check: Node version command.
Recap
Recap: Verified Node and npm, ran a .js file, learned a simple npm script, and used console tools in both Node and the browser.
Learn JavaScript with an AI tutor — free
Write and run real code in your browser, get instant help from a 24/7 AI tutor, and pick up where you left off on the web or in the app.
- Courses
- 59
- Lessons
- 200
Frequently Asked Questions
Is the “Setup: Node + npm, Running .js, DevTools Console” lesson free?
Yes — any 3 lessons of the JavaScript Academy learning path, including “Setup: Node + npm, Running .js, DevTools Console”, are free to read in full here on the web. After that, CoddyKit PRO unlocks every lesson, plus interactive practice with a built-in code editor and a 24/7 AI tutor. The JavaScript Academy course includes 3 lessons in total.
What will I learn in “Setup: Node + npm, Running .js, DevTools Console”?
Install Node, verify versions, run .js files, learn npm basics, and practice with the browser DevTools console. You practise JavaScript Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start JavaScript Academy?
No prior experience is required. JavaScript Academy on CoddyKit is structured for beginners through advanced learners, so you can start here or from the beginning and move at your own pace. This is lesson 2 of 3.
How long does the “Setup: Node + npm, Running .js, DevTools Console” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this JavaScript Academy lesson?
Yes. Every JavaScript Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- What is JavaScript? Engines (V8/SpiderMonkey) & Runtimes (Browser vs Node)
- Setup: Node + npm, Running .js, DevTools Console
- First Program & I/O (console, alerts in browser)