CodeNFacts · Programming Language
JavaScript
The language that runs in every browser on Earth - and, thanks to Node.js, on the server too. This page is a complete, project-ready reference: full syllabus, cheat sheets, diagrams, and the theory behind why JS works the way it does.
21
Chapters
36
Topics Covered
3
Diagrams
About JavaScript
One language, every corner of software
Where it's used
Frontend UI, backend services with Node.js, mobile apps (React Native), desktop apps (Electron), game engines, browser extensions, automation scripts, and increasingly AI-assisted tooling. Almost no software category is untouched by JS.
Why it endures
It's the only language that ships natively in every browser, so the frontend is never optional. Add a fast JIT-compiled runtime, an enormous npm ecosystem, and a syntax that's approachable for beginners yet powerful enough for large systems.
Core features
Dynamic typing, prototype-based objects, first-class functions, closures, and an event-driven, non-blocking model built around the event loop — this combination is what makes async code (network calls, timers, UI events) feel natural.
Where it's headed
WebAssembly for performance-critical code running alongside JS, server components blurring frontend/backend lines, edge runtimes shrinking cold-start times, and AI-assisted coding tools making JS's already-low barrier to entry even lower.
The theory worth understanding early
JavaScript is single-threaded — only one thing runs at a time on the Call Stack. What makes it feel concurrent is the event loop: long-running work (timers, network requests) is handed off to the browser or Node's C++ APIs, and only the follow-up callback returns to the Call Stack later. Understanding this one idea explains hoisting quirks, why async/await reads top-to-bottom while still being non-blocking, and why a Promise callback always runs before a setTimeout callback, even at 0ms.
Full Syllabus
Every topic, in order
What JavaScript is, where it runs, and how it went from a 10-day prototype to the language of the web.
- ▹High-level, interpreted, object-oriented, event-driven language
- ▹Powers Frontend, Backend, Mobile, Desktop, Games, APIs, Automation, AI/ML
- ▹Runs in the browser (Chrome, Firefox, Edge) and on the server via Node.js
- ▹Created by Brendan Eich in 1995, built in just 10 days
- ▹Renamed twice — Mocha → LiveScript → JavaScript
console.log("Hello World");
// Output: Hello WorldQuick Reference
Cheat sheets
Array Methods
push()add to endpop()remove from endmap()transform every itemfilter()keep matching itemsreduce()fold into one valuefind()first matchincludes()true / false checksort()reorder in placeString Methods
lengthcharacter counttoUpperCase()ALL CAPSslice(a,b)extract substringtrim()remove edge spacesincludes()contains checksplit()string → arrayreplace()swap textstartsWith()prefix checkComparison & Logic
==loose equality (coerces)===strict equality&&AND||OR!NOT?? nullish coalescing?:ternary shorthand!!xforce to booleanData Types
Number10, 3.14String"text"Booleantrue / falseUndefineddeclared, no valueNullexplicitly emptyBigInt123nSymbolunique idObject/Arraynon-primitiveVisual Notes
Diagrams & sketches
The Event Loop
Closures
Scope Chain
Keep this reference offline
One click gets you every chapter, code example, and cheat sheet on this page in a single text file.