โœฆTechTalks
Chapter 1 of 12

1.1 Welcome to the World of JavaScript

Created in 1995 by Brendan Eich in just 10 days at Netscape, JavaScript has evolved from a simple scripting language for adding basic interactive elements to websites into the world's most ubiquitous programming language.

The Evolution of JavaScript
โšก
1995 - Inception
Mocha -> LiveScript -> JavaScript created by Brendan Eich
๐Ÿ“œ
1997 - ECMAScript 1
Standardized by ECMA International (ECMA-262)
๐ŸŸข
2009 - ES5 & Node.js
Strict mode, JSON support, and JS moves to the server
๐Ÿš€
2015 - ES6 (ECMAScript 2015)
Massive evolution: Classes, Arrow Functions, Promises, Let/Const, Modules
โœจ
Modern (ES2016 - Present)
Annual TC39 release cycle bringing async/await, optional chaining, nullish coalescing, and top-level await

The TC39 Process

Technical Committee 39 (TC39) is the governing body responsible for evolving ECMAScript standards. Every new language feature progresses through 5 strict stages:

The 5 Stages of TC39 Proposals

Stage 0 (Strawman) -> Stage 1 (Proposal) -> Stage 2 (Draft) -> Stage 3 (Candidate - specified & tested) -> Stage 4 (Finished - included in the next yearly standard release).

1.2 Setting Up the Developer Environment

To write professional JavaScript, you need modern tooling. Today's JavaScript ecosystem spans multiple runtimes beyond the browser:

Checking Runtimes in Terminalbash
# Check Node.js version
node -v
# Output: v22.x.x

# Check Bun (Ultra-fast modern runtime & package manager)
bun -v
# Output: 1.x.x

# Check Deno (Secure default runtime)
deno --version

Essential Developer Tools

Modern browsers (Chrome, Firefox, Safari, Edge) come built-in with DevTools. Key panels you will use daily include:

Browser DevTools Power Tips

1. Console: Execute JS expressions directly. 2. Sources: Set breakpoints, inspect scope variables, and pause execution. 3. Network: Inspect HTTP/WebSocket requests, payloads, and latency. 4. Memory: Take heap snapshots to detect memory leaks.

1.3 How JavaScript Executes Under the Hood

JavaScript is an interpreted, Just-In-Time (JIT) compiled, single-threaded language. Engines like Chrome's V8, Safari's JavaScriptCore, and Firefox's SpiderMonkey transform raw text into optimized machine code.

V8 Engine Execution Pipeline
๐ŸŒณ
1. Parser
Scans code & builds Abstract Syntax Tree (AST)
๐Ÿ”ฅ
2. Ignition Interpreter
Generates fast bytecode for immediate execution
๐Ÿ“Š
3. TurboFan Profiler
Identifies hot functions and type feedback
โšก
4. TurboFan JIT Compiler
Compiles hot bytecode into highly optimized Machine Code
โš ๏ธ
5. Deoptimization
Bails back to bytecode if dynamic types change unexpectedly
Performance Gotcha: Deoptimization

V8 optimizes code assuming function arguments maintain consistent hidden classes (shapes). Passing different data types to hot functions forces TurboFan to deoptimize machine code back to bytecode, slowing down execution!