Loading…
Loading…
JavaScript
A complete JavaScript course — from the language fundamentals and the DOM to modern features, modules, async, tooling and the parts you actually reach for day to day. 140 articles with practice quizzes.
Adding and removing at either end of an array with push, pop, shift and unshift, building stacks and queues (and why shift gets slow), combining arrays with concat and spread, and flattening nested arrays with flat and flatMap, including flatMap as a map-and-filter in one step.
kvi5hnuCode Sprout team member6 minHow reduce works step by step, why you should almost always pass an initial value, common patterns (sum, max, count, group, index by key, flatten, statistics, pipelines), reduceRight, the spread-in-reduce performance trap, and when a loop or a dedicated method is clearer.
kvi5hnuCode Sprout team member6 minEvery way to search an array: includes and indexOf for exact values (and why indexOf can't find NaN), find, findIndex, findLast and findLastIndex for conditions, some and every for yes/no questions, the find-returns-0 trap, object identity, finding all matches, and when a Set or Map is faster.
kvi5hnuCode Sprout team member5 minThe three workhorse array methods: forEach for side effects, map to transform every element, filter to keep the ones you want. Callback arguments, chaining, the map(parseInt) trap, mutation inside callbacks, async callbacks, thisArg, and choosing between methods and loops.
kvi5hnuCode Sprout team member6 minReading and writing array elements, why indexes are really property names, at() with negative indexes, how length grows and truncates, sparse arrays and holes (and how each method treats them), adding and removing elements, delete vs splice, emptying an array, and arrays of arrays.
kvi5hnuCode Sprout team member6 minWhat JavaScript arrays are (ordered, untyped, dynamic, objects with numeric keys) and every way to create one: literals, holes and trailing commas, spread from any iterable, the Array() constructor and its traps, Array.of, Array.from with a mapping function, ranges, 2D grids and Array.fromAsync.
kvi5hnuCode Sprout team member6 minAccessor properties in JavaScript: defining get and set in object literals, computed values that stay in sync, validating writes, read-only and write-only properties, inheritance, lazy getters, the infinite recursion trap, how copying and JSON treat accessors, and when not to use them.
kvi5hnuCode Sprout team member6 minThe modern object literal: shorthand properties, computed property names, symbol keys, shorthand methods (and how they differ from function properties and arrow functions), super in literals, __proto__ in literals, spread, duplicate keys and evaluation order.
kvi5hnuCode Sprout team member6 minThe methods every object inherits from Object.prototype and the four you override: toString for readable strings, toLocaleString for locale-aware output, valueOf for numeric behavior, toJSON for serialization, plus type tags and Symbol.toStringTag.
kvi5hnuCode Sprout team member6 minJSON in JavaScript: the format's strict rules, JSON.stringify and JSON.parse, what happens to undefined, NaN, dates, Maps, BigInt and cycles, pretty-printing, replacers, toJSON, revivers, safe parsing and large numbers with JSON.rawJSON.
kvi5hnuCode Sprout team member7 minHow Object.assign and object spread copy properties, which wins on collisions, defaults and overrides, filling only missing keys, getters and setters, nested objects and deep merge, prototype pollution, immutable updates and the cost of spreading in loops.
kvi5hnuCode Sprout team member7 minChecking whether a property exists (in, Object.hasOwn, hasOwnProperty, missing vs undefined), listing properties with Object.keys, values, entries, getOwnPropertyNames and Reflect.ownKeys, key order, Object.fromEntries, Object.groupBy and delete.
kvi5hnuCode Sprout team member6 minDot vs bracket notation, dynamic keys and how they become strings, objects as lookup tables, why reads follow the prototype chain while writes don't, shadowing, shared state on prototypes, inherited setters, property access errors and when assignments fail.
kvi5hnuCode Sprout team member6 minWhat a JavaScript object really is (properties, own vs inherited, property attributes), the three ways to create one (object literals, new with a constructor, Object.create), how prototypes and the prototype chain work, and null-prototype objects as safe dictionaries.
kvi5hnuCode Sprout team member7 minHow to turn on strict mode, why modules and classes are always strict, everything it changes (implicit globals, silent failures, this in plain calls, arguments, eval, octal literals, reserved words), plus the debugger statement and the deprecated with statement.
kvi5hnuCode Sprout team member8 minHow exceptions work in JavaScript: throwing Error objects, how an exception travels up the call stack, try/catch/finally in every combination, optional catch binding, the built-in error types, custom errors, error.cause, rethrowing, AggregateError, Error.isError, finally traps and async errors.
kvi5hnuCode Sprout team member8 minHow break and continue change the flow of loops and switch, where each one jumps, labeled statements for leaving nested loops, the break-inside-switch-inside-loop trap, why return in forEach doesn't stop it, early exit with find and some, and the rules for return.
kvi5hnuCode Sprout team member7 minfor...of (values of arrays, strings, Maps, Sets, generators) vs for...in (enumerable keys, inherited ones included): indexes with entries(), objects with Object.entries, key order, holes, changing collections mid-loop, early exit and cleanup, and for await.
kvi5hnuCode Sprout team member7 minHow while, do/while and for loops run step by step, why let in a for header gives each iteration its own variable, multiple loop variables, infinite loops on purpose and by accident, off-by-one errors, modifying an array while looping over it, and how to choose the right loop.
kvi5hnuCode Sprout team member7 minHow switch picks a case with strict equality, why missing breaks fall through and when that's useful, grouping cases, default in any position, the let/const scoping trap between cases, switch (true), and when an object or Map lookup is a better choice than a switch.
kvi5hnuCode Sprout team member7 min