For: Anyone going from zero programming (or Java/Python background) to internship-ready in JS/TS
Goal: Understand and write JavaScript and TypeScript code the way itβs done in real companies
Covers: Variables β Functions β Async β Classes β Node.js β TypeScript β Generics β Real project patterns
π What This Guide Covers
JavaScript (the language)
βββ Fundamentals β variables, types, loops, conditions
βββ Functions & Scope β closures, this, callbacks
βββ Arrays & Objects β map/filter/reduce, destructuring, spread
βββ Async Programming β promises, async/await, the event loop
βββ Classes & Modules β OOP in JS, import/export
βββ Node.js Ecosystem β npm, fs, http, Express
βββ Patterns & Testing β design patterns, Jest, ESLint
TypeScript (typed JavaScript)
βββ Basics β type annotations, interfaces, enums
βββ Intermediate β generics, utility types, type narrowing
βββ Advanced β decorators, branded types, .d.ts files
βββ In Real Projects β Node.js+TS, React+TS, AWS CDK patterns
Internship Skills
βββ Coding Guide β reading code, git, code review, self-checklist
π Reading Order
π’ Phase 1 β JavaScript (Read in order, every file)
| # | File | What You Learn | Time |
|---|---|---|---|
| 01 | 01_JS_Fundamentals.md |
Variables, types, operators, loops, conditions | 45 min |
| 02 | 02_JS_Functions_Scope.md |
Functions, scope, closures, this, callbacks |
60 min |
| 03 | 03_JS_Arrays_Objects.md |
Array/object methods, destructuring, spread, ?. |
60 min |
| 04 | 04_JS_Async_Programming.md |
Event loop, Promises, async/await, fetch | 90 min |
| 05 | 05_JS_Classes_Modules.md |
ES6 classes, inheritance, import/export | 60 min |
| 06 | 06_JS_NodeJS_Ecosystem.md |
npm, Node built-ins, Express, .env | 60 min |
| 07 | 07_JS_Patterns_Testing.md |
Patterns, Jest testing, ESLint, debugging | 60 min |
π΅ Phase 2 β TypeScript (Read after Phase 1)
| # | File | What You Learn | Time |
|---|---|---|---|
| 08 | 08_TS_Basics.md |
Types, interfaces, enums, type aliases | 60 min |
| 09 | 09_TS_Intermediate.md |
Generics, utility types, type narrowing | 90 min |
| 10 | 10_TS_Advanced.md |
Decorators, strict mode, branded types, .d.ts | 60 min |
| 11 | 11_TS_In_Projects.md |
Node+TS, React+TS, CDK patterns, real setup | 60 min |
β Phase 3 β Internship Readiness
| # | File | What You Learn | Time |
|---|---|---|---|
| 12 | 12_Internship_Coding_Guide.md |
Reading code fast, git workflow, code review, self-check | 45 min |
ποΈ The Big Picture
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β HOW JS/TS FITS TOGETHER β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
JavaScript = the language that runs everywhere
β
βββ In the Browser (Chrome, Firefox, Safari)
β βββ React, Vue, Angular β UI frameworks
β
βββ On the Server (Node.js)
βββ Express β web server
βββ AWS Lambda β serverless functions
βββ CLI tools, scripts, automation
TypeScript = JavaScript + types
β
βββ You write .ts files
βββ TypeScript compiler (tsc) checks your types
βββ Compiles to .js files
βββ Runtime still runs JavaScript β types disappear at runtime
Real Company Stack (what you'll see at internships):
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Frontend: React + TypeScript + Redux β
β Backend: Node.js + TypeScript + Express (or Lambda) β
β Infra: AWS CDK + TypeScript β
β Tests: Jest + TypeScript β
β Build: npm/yarn + tsconfig.json + webpack/esbuild β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π― What Youβll Be Able to Do After This Guide
After Phase 1 (JavaScript):
- Read and understand any Node.js backend codebase
- Write async functions that call APIs and databases
- Use all common array/object methods fluently
- Debug JavaScript code confidently
After Phase 2 (TypeScript):
- Add types to any JavaScript codebase
- Write generic functions and utility types
- Read TypeScript code in React and Node.js projects
- Understand AWS CDK code (TypeScript infrastructure)
After Phase 3 (Internship):
- Navigate an unfamiliar codebase quickly
- Contribute to a real project in week 1
- Write code that passes code review
- Ask good questions and communicate clearly
π Key Terms Before You Start
| Term | Meaning |
|---|---|
| Runtime | Where code actually runs (browser or Node.js) |
| Compile | Convert TypeScript β JavaScript before running |
| Transpile | Convert modern JS β older JS for compatibility |
| npm | Node Package Manager β tool for installing libraries |
| package.json | Project config file β lists dependencies and scripts |
| node_modules | Folder where npm puts installed packages |
| Lambda function | Function that runs in the cloud without managing servers |
| REST API | Web API that uses HTTP methods (GET, POST, PUT, DELETE) |
| JSON | JavaScript Object Notation β text format for sending data |
| Async | Code that doesnβt block β can wait for something without freezing |
| Promise | Object representing a value that will be available in the future |
| Callback | A function passed as an argument to be called later |
| Module | A file that exports code for other files to use |
| Destructuring | Extract multiple values from an object/array in one line |
| Spread | Copy all properties/items with ... |
| Type | In TypeScript β describes what shape a value has |
| Interface | TypeScript way of describing an objectβs shape |
| Generic | A type that works with any type (like a template) |
π Start Here Based On Your Background
| βI already knowβ¦β | Start at |
|---|---|
| Nothing about programming | File 01 (read everything in order) |
| Python/Java basics | File 01 (skim sections 1-3, read section 4+ carefully) |
| Basic JavaScript | File 04 (async is where it gets real) |
| JavaScript well | File 08 (TypeScript) |
| Both JS and TS | File 12 (internship skills) |
π‘ How to Use This Guide
- Read, donβt skim β every example was chosen carefully
- Type the code yourself β muscle memory matters
- Run the examples β use Node.js or browser console
- Do the practice exercises at the end of each section
- Come back β some concepts only click after youβve seen them in real code
Setup to run examples:
# Install Node.js (download from nodejs.org)
node --version # should print v18.x.x or higher
# Run a JS file
node myfile.js
# Install TypeScript
npm install -g typescript
tsc --version # should print Version 5.x.x
# Run TypeScript file
tsc myfile.ts # compile to myfile.js
node myfile.js # run it
# Or use ts-node (run TypeScript directly)
npm install -g ts-node
ts-node myfile.ts