[{"data":1,"prerenderedAt":655},["ShallowReactive",2],{"page-\u002Fjs":3},{"id":4,"title":5,"body":6,"description":16,"extension":648,"meta":649,"navigation":650,"path":651,"seo":652,"stem":653,"__hash__":654},"content\u002Fjs\u002Findex.md","JavaScript: Zero to Hero",{"type":7,"value":8,"toc":635},"minimark",[9,13,17,22,48,52,55,59,64,236,240,414,418,512,516],[10,11,5],"h1",{"id":12},"javascript-zero-to-hero",[14,15,16],"p",{},"A complete quiz-based curriculum covering JavaScript from first principles to expert-level, production-grade knowledge. Every quiz is self-contained — read the explanations, not just the answers, to build a full mental model of the language.",[18,19,21],"h2",{"id":20},"how-to-use-this-quiz-track","How to Use This Quiz Track",[23,24,25,29,32,40],"ul",{},[26,27,28],"li",{},"Work through the parts in order; later quizzes assume knowledge from earlier ones.",[26,30,31],{},"Each quiz has 20 multiple-choice questions, ordered from basic recall to edge cases to best-practice judgment calls.",[26,33,34,35,39],{},"Click ",[36,37,38],"strong",{},"Show Answer"," only after committing to a choice — the explanations cover why distractors are wrong, which is where the real quizing happens.",[26,41,42,43,47],{},"Questions favor \"gotchas\" (coercion traps, event-loop ordering, ",[44,45,46],"code",{},"this"," binding surprises) over rote recall, so expect to be wrong sometimes on the first pass.",[18,49,51],{"id":50},"prerequisites","Prerequisites",[14,53,54],{},"None for Part 1. Basic command-line comfort helps for the tooling and Node.js-flavored questions in later parts.",[18,56,58],{"id":57},"curriculum","Curriculum",[60,61,63],"h3",{"id":62},"part-1-foundations","Part 1 — Foundations",[65,66,67,83],"table",{},[68,69,70],"thead",{},[71,72,73,77,80],"tr",{},[74,75,76],"th",{},"#",[74,78,79],{},"Topic",[74,81,82],{},"Why It Matters",[84,85,86,102,126,147,166,180,194,208,222],"tbody",{},[71,87,88,92,99],{},[89,90,91],"td",{},"01",[89,93,94],{},[95,96,98],"a",{"href":97},"\u002Fjs\u002F01-introduction-and-setup","Introduction & Setup",[89,100,101],{},"Where JS runs, engines, and the ECMAScript version treadmill — context for every quirk that follows.",[71,103,104,107,113],{},[89,105,106],{},"02",[89,108,109],{},[95,110,112],{"href":111},"\u002Fjs\u002F02-variables-and-data-types","Variables & Data Types",[89,114,115,118,119,118,122,125],{},[44,116,117],{},"var","\u002F",[44,120,121],{},"let",[44,123,124],{},"const"," scoping and the primitive vs. reference type split drive most beginner bugs.",[71,127,128,131,137],{},[89,129,130],{},"03",[89,132,133],{},[95,134,136],{"href":135},"\u002Fjs\u002F03-operators-and-expressions","Operators & Expressions",[89,138,139,142,143,146],{},[44,140,141],{},"=="," vs ",[44,144,145],{},"===",", coercion rules, and operator precedence are classic interview traps.",[71,148,149,152,158],{},[89,150,151],{},"04",[89,153,154],{},[95,155,157],{"href":156},"\u002Fjs\u002F04-control-flow","Control Flow",[89,159,160,161,142,163,165],{},"Truthy\u002Ffalsy edge cases and loop scoping (",[44,162,121],{},[44,164,117],{}," in closures) trip up even experienced devs.",[71,167,168,171,177],{},[89,169,170],{},"05",[89,172,173],{},[95,174,176],{"href":175},"\u002Fjs\u002F05-functions-and-scope","Functions & Scope",[89,178,179],{},"Hoisting, the TDZ, and function vs. arrow semantics underpin everything else in JS.",[71,181,182,185,191],{},[89,183,184],{},"06",[89,186,187],{},[95,188,190],{"href":189},"\u002Fjs\u002F06-strings-and-template-literals","Strings & Template Literals",[89,192,193],{},"Immutability, Unicode surrogate pairs, and tagged templates are common gotchas in string handling.",[71,195,196,199,205],{},[89,197,198],{},"07",[89,200,201],{},[95,202,204],{"href":203},"\u002Fjs\u002F07-objects-and-properties","Objects & Properties",[89,206,207],{},"Property descriptors, shallow vs. deep copies, and key coercion shape real-world bugs.",[71,209,210,213,219],{},[89,211,212],{},"08",[89,214,215],{},[95,216,218],{"href":217},"\u002Fjs\u002F08-arrays-and-array-methods","Arrays & Array Methods",[89,220,221],{},"Mutating vs. non-mutating methods and sparse arrays cause subtle production issues.",[71,223,224,227,233],{},[89,225,226],{},"09",[89,228,229],{},[95,230,232],{"href":231},"\u002Fjs\u002F09-destructuring-and-spread","Destructuring & Spread",[89,234,235],{},"Default values, nested patterns, and spread vs. rest are everywhere in modern codebases.",[60,237,239],{"id":238},"part-2-core-language-mastery","Part 2 — Core Language Mastery",[65,241,242,252],{},[68,243,244],{},[71,245,246,248,250],{},[74,247,76],{},[74,249,79],{},[74,251,82],{},[84,253,254,268,287,301,324,338,360,382,396],{},[71,255,256,259,265],{},[89,257,258],{},"10",[89,260,261],{},[95,262,264],{"href":263},"\u002Fjs\u002F10-classes-and-prototypes","Classes & Prototypes",[89,266,267],{},"Classes are sugar over the prototype chain — understanding both explains inheritance bugs.",[71,269,270,273,282],{},[89,271,272],{},"11",[89,274,275],{},[95,276,278,279,281],{"href":277},"\u002Fjs\u002F11-this-keyword","The ",[44,280,46],{}," Keyword",[89,283,284,286],{},[44,285,46],{}," binding rules are the single most-misunderstood part of JavaScript.",[71,288,289,292,298],{},[89,290,291],{},"12",[89,293,294],{},[95,295,297],{"href":296},"\u002Fjs\u002F12-closures-and-lexical-scope","Closures & Lexical Scope",[89,299,300],{},"Closures power memoization, private state, and are a top source of loop-variable bugs.",[71,302,303,306,312],{},[89,304,305],{},"13",[89,307,308],{},[95,309,311],{"href":310},"\u002Fjs\u002F13-higher-order-functions","Higher-Order Functions",[89,313,314,118,317,118,320,323],{},[44,315,316],{},"map",[44,318,319],{},"filter",[44,321,322],{},"reduce"," composition is the backbone of idiomatic modern JS.",[71,325,326,329,335],{},[89,327,328],{},"14",[89,330,331],{},[95,332,334],{"href":333},"\u002Fjs\u002F14-modules","Modules",[89,336,337],{},"ESM vs. CommonJS interop and circular imports are frequent real-world pain points.",[71,339,340,343,349],{},[89,341,342],{},"15",[89,344,345],{},[95,346,348],{"href":347},"\u002Fjs\u002F15-callbacks-and-the-event-loop","Callbacks & the Event Loop",[89,350,351,352,355,356,359],{},"Microtask vs. macrotask ordering explains why ",[44,353,354],{},"Promise.then"," beats ",[44,357,358],{},"setTimeout(0)",".",[71,361,362,365,371],{},[89,363,364],{},"16",[89,366,367],{},[95,368,370],{"href":369},"\u002Fjs\u002F16-promises","Promises",[89,372,373,374,377,378,381],{},"Chaining, error propagation, and ",[44,375,376],{},"Promise.all"," vs. ",[44,379,380],{},"allSettled"," are daily async concerns.",[71,383,384,387,393],{},[89,385,386],{},"17",[89,388,389],{},[95,390,392],{"href":391},"\u002Fjs\u002F17-async-await","Async\u002FAwait",[89,394,395],{},"Await ordering, parallel vs. sequential awaits, and try\u002Fcatch scope are frequent bugs.",[71,397,398,401,407],{},[89,399,400],{},"18",[89,402,403],{},[95,404,406],{"href":405},"\u002Fjs\u002F18-error-handling","Error Handling",[89,408,409,410,413],{},"Custom errors, ",[44,411,412],{},"finally"," semantics, and swallowed rejections shape reliability.",[60,415,417],{"id":416},"part-3-browser-application-layer","Part 3 — Browser & Application Layer",[65,419,420,430],{},[68,421,422],{},[71,423,424,426,428],{},[74,425,76],{},[74,427,79],{},[74,429,82],{},[84,431,432,446,460,477,498],{},[71,433,434,437,443],{},[89,435,436],{},"19",[89,438,439],{},[95,440,442],{"href":441},"\u002Fjs\u002F19-the-dom","The DOM",[89,444,445],{},"Reflow\u002Frepaint costs and live vs. static node lists affect UI performance.",[71,447,448,451,457],{},[89,449,450],{},"20",[89,452,453],{},[95,454,456],{"href":455},"\u002Fjs\u002F20-events","Events",[89,458,459],{},"Bubbling, capturing, and delegation are essential for building efficient UIs.",[71,461,462,465,471],{},[89,463,464],{},"21",[89,466,467],{},[95,468,470],{"href":469},"\u002Fjs\u002F21-web-storage-and-apis","Web Storage & APIs",[89,472,473,476],{},[44,474,475],{},"localStorage"," quotas, synchronous cost, and Fetch API quirks matter in production.",[71,478,479,482,488],{},[89,480,481],{},"22",[89,483,484],{},[95,485,487],{"href":486},"\u002Fjs\u002F22-timers-and-scheduling","Timers & Scheduling",[89,489,490,493,494,497],{},[44,491,492],{},"setTimeout"," drift, ",[44,495,496],{},"requestAnimationFrame",", and debounce\u002Fthrottle are UI staples.",[71,499,500,503,509],{},[89,501,502],{},"23",[89,504,505],{},[95,506,508],{"href":507},"\u002Fjs\u002F23-functional-programming","Functional Programming",[89,510,511],{},"Currying, composition, and immutability patterns are increasingly idiomatic in JS.",[60,513,515],{"id":514},"part-4-advanced-professional","Part 4 — Advanced & Professional",[65,517,518,528],{},[68,519,520],{},[71,521,522,524,526],{},[74,523,76],{},[74,525,79],{},[74,527,82],{},[84,529,530,544,558,572,586,600,618],{},[71,531,532,535,541],{},[89,533,534],{},"24",[89,536,537],{},[95,538,540],{"href":539},"\u002Fjs\u002F24-design-patterns","Design Patterns",[89,542,543],{},"Module, singleton, observer, and factory patterns recur across every large JS codebase.",[71,545,546,549,555],{},[89,547,548],{},"25",[89,550,551],{},[95,552,554],{"href":553},"\u002Fjs\u002F25-testing","Testing",[89,556,557],{},"Mocking, spies, and async test pitfalls determine whether a test suite is trustworthy.",[71,559,560,563,569],{},[89,561,562],{},"26",[89,564,565],{},[95,566,568],{"href":567},"\u002Fjs\u002F26-performance-and-optimization","Performance & Optimization",[89,570,571],{},"Memory leaks, debouncing, and V8 optimization quirks matter at scale.",[71,573,574,577,583],{},[89,575,576],{},"27",[89,578,579],{},[95,580,582],{"href":581},"\u002Fjs\u002F27-tooling-and-build-systems","Tooling & Build Systems",[89,584,585],{},"Bundlers, tree-shaking, and source maps are unavoidable in modern JS delivery.",[71,587,588,591,597],{},[89,589,590],{},"28",[89,592,593],{},[95,594,596],{"href":595},"\u002Fjs\u002F28-typescript-essentials","TypeScript Essentials",[89,598,599],{},"Structural typing and type narrowing are now baseline JS-adjacent knowledge.",[71,601,602,605,611],{},[89,603,604],{},"29",[89,606,607],{},[95,608,610],{"href":609},"\u002Fjs\u002F29-security","Security",[89,612,613,614,617],{},"XSS, prototype pollution, and unsafe ",[44,615,616],{},"eval"," usage are the most common JS vulnerabilities.",[71,619,620,623,629],{},[89,621,622],{},"30",[89,624,625],{},[95,626,628],{"href":627},"\u002Fjs\u002F30-exercises-and-projects","Exercises & Projects (Capstone)",[89,630,631,632,634],{},"A mixed-review capstone pulling together async, closures, ",[44,633,46],{},", and performance.",{"title":636,"searchDepth":637,"depth":637,"links":638},"",2,[639,640,641],{"id":20,"depth":637,"text":21},{"id":50,"depth":637,"text":51},{"id":57,"depth":637,"text":58,"children":642},[643,645,646,647],{"id":62,"depth":644,"text":63},3,{"id":238,"depth":644,"text":239},{"id":416,"depth":644,"text":417},{"id":514,"depth":644,"text":515},"md",{},true,"\u002Fjs",{"title":5,"description":16},"js\u002Findex","HYCfnR2BfKSfg2ZwJtI7FAfHMjGoZFaCECoABp3WJr0",1787335397337]