Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🟒 Node Fundamentals

Learn JavaScript + Node.js from zero to hero β€” Malaysian style! πŸ‡²πŸ‡Ύ

Node License Lessons Exercises

A complete, beginner-friendly JavaScript + Node.js learning guide with hands-on lessons, exercises, and solutions. Written in fun Malaysian English so you won't fall asleep reading code. Confirm shiok one!

New to programming? Start at Lesson 00 and go in order. Part 1 is pure JavaScript β€” you don't need to know anything before starting.

πŸ—ΊοΈ The Grand Master Roadmap

This repo is Phase 1 of a three-phase journey:

  • Phase 1 β€” THIS repo (node-fundamentals): JavaScript + Node core β†’ confident Node developer (CLI tools, file scripts, simple servers)
  • Phase 2 β€” node-backend (coming soon): Express/Fastify, REST APIs, databases, auth, testing, deployment β†’ professional backend developer
  • Phase 3 β€” node-advanced (coming soon): streams deep-dive, worker threads, performance, security, TypeScript β†’ master

πŸ“š What you'll learn

Part 1 β€” JavaScript (Lessons 00–11): the language itself, running in Node.

# Lesson Topics
00 Hello Node! What is Node, node vs browser, running scripts
01 Variables & Types let, const, var, typeof, numbers, strings, booleans
02 Operators & Coercion Arithmetic, == vs ===, truthiness, short-circuit
03 Strings & Template Literals Methods, slicing, template literals, .includes()
04 Arrays map, filter, reduce, spread, destructuring
05 Objects & JSON Object literals, destructuring, JSON.parse/stringify
06 Control Flow if/else, switch, ternary, logical operators
07 Loops for, while, for...of, for...in, break, continue
08 Functions function declarations, arrows, callbacks, default params
09 Scope & Closures Block scope, hoisting, closures, IIFE
10 Error Handling try/catch/finally, throw, custom errors
11 Async JavaScript Callbacks, Promises, async/await β€” the bridge to Node

Part 2 β€” Node Runtime (Lessons 12–19): what makes Node special.

# Lesson Topics
12 Modules CommonJS require, module.exports, ESM import
13 npm init, install, package.json, scripts, semver
14 File System fs read/write, path, sync vs async
15 Events EventEmitter, on/emit, once
16 Streams & Buffers Buffers, readable/writable streams, pipe
17 HTTP & Servers http.createServer, routes, JSON API
18 CLI & Process process.argv, env, exit codes, stdin
19 Capstone: Todo CLI Build a real todo app with file persistence

βœ… Requirements

  • Node.js 24 LTS or newer β€” download from nodejs.org
  • Nothing else! No frameworks, no dependencies. Everything runs with plain node.

Check your version:

node --version   # should print v24.x.x or higher

πŸš€ Quick Start

  1. Clone the repo:

    git clone https://github.com/subimpact/node-fundamentals.git
    cd node-fundamentals
  2. Read and run lessons in order:

    node lessons/00_hello_node.js
    node lessons/01_variables_and_types.js
    # ... and so on

    (Not sure if your output is right? Check EXPECTED_OUTPUTS.md!)

  3. Try the exercises:

    # Open the exercise file, fill in the TODOs
    # Then run it. There are built-in Malaysian checkers to guide you!
    node exercises/01_variables_exercises.js
    
    # Check the solutions when you're done:
    node solutions/01_variables_solutions.js
  4. Run everything at once (lessons + solutions must all pass):

    npm test

πŸ“ Project Structure

node-fundamentals/
β”œβ”€β”€ README.md              ← You are here!
β”œβ”€β”€ LICENSE                ← MIT License
β”œβ”€β”€ .gitignore             ← Git ignore rules
β”œβ”€β”€ package.json           ← Project metadata + npm test
β”œβ”€β”€ EXPECTED_OUTPUTS.md    ← What each lesson should print
β”œβ”€β”€ CHANGELOG.md           ← Version history
β”œβ”€β”€ CONTRIBUTING.md        ← How to help out
β”œβ”€β”€ lessons/               ← 20 lesson files (read + run these!)
β”œβ”€β”€ exercises/             ← 13 exercise files with built-in checkers
β”œβ”€β”€ solutions/             ← 13 solution files
└── scripts/
    └── verify.js          ← Runs every lesson + solution (npm test)

πŸŽ“ How the exercises work

Each exercise file has TODO comments where you write your code, and a checker at the bottom that tests your answers automatically:

$ node exercises/04_arrays_exercises.js
βœ… double([1, 2, 3]) β€” betul!
βœ… evens([1, 2, 3, 4, 5, 6]) β€” betul!
❌ total([1, 2, 3])
   got:      6
   expected: 7

No setup, no test framework β€” just run the file and see how you did. Solutions are in solutions/ when you're stuck.

🀝 Contributing

See CONTRIBUTING.md β€” terima kasih in advance! πŸ‡²πŸ‡Ύ

πŸ“œ License

MIT β€” use it, share it, teach with it. Just keep the attribution.

About

Learn JavaScript + Node.js from zero to hero β€” Malaysian style! πŸ‡²πŸ‡Ύ 20 lessons, exercises with built-in checkers, solutions. Node 24 LTS.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages