Skip to content
GeeksSmith

JavaScript

Closures, Event Loop, Promises, Garbage Collection, this binding, Prototypes, and Event Delegation.

11 In-Depth Topics
javascript
beginner 6m

Closures

A closure is a function bundled together with the lexical scope it was created in, so it keeps access to those outer variables even after the outer function has returned.

#javascript#fundamentals
Learn
javascript
intermediate 6m

Event Loop & Asynchronous JavaScript

The Event Loop is the single-threaded coordinator that constantly monitors the Call Stack and transfers pending callbacks from the Microtask Queue and Task Queue once the stack is empty.

#javascript#async
Learn
javascript
intermediate 7m

Promises, Async/Await & Race Conditions

A Promise is an object representing the eventual completion (or failure) of an asynchronous operation and its resulting value, preventing callback hell via chainable state transitions (pending -> fulfilled/rejected).

#javascript#promises
Learn
javascript
intermediate 5m

Debounce & Throttle Internals

Debounce delays execution until a burst of events pauses for N milliseconds; Throttle guarantees execution at most once every N milliseconds during continuous event streams.

#javascript#debounce
Learn
javascript
advanced 6m

Object Mutation & Deep Clone Internals

Deep Cloning creates an exact, independent copy of an object and all its nested references, avoiding shared object mutations while handling complex types like Date, RegExp, Map, Set, and circular references.

#javascript#deep-clone
Learn
javascript
advanced 7m

JavaScript & React Memory Leaks

A memory leak occurs when memory allocated by an application is no longer needed by the program logic but is retained by unintended references, preventing Garbage Collection (GC) from reclaiming it.

#javascript#memory-leaks
Learn
javascript
beginner 5m

Scope, Hoisting & Temporal Dead Zone

Hoisting is JavaScript's compilation phase behavior where variable and function declarations are registered into memory within their lexical scope before any line of code executes.

#javascript#scope
Learn
javascript
intermediate 8m

this, Execution Context, call, apply, and bind

In JavaScript, 'this' refers to the object that is executing the current function. Its value is determined at runtime based on invocation context, unless explicitly bound or within an arrow function.

#javascript#this
Learn
javascript
intermediate 9m

Prototypes, Prototype Chain, and Class Inheritance

JavaScript uses prototypal inheritance where objects hold an internal [[Prototype]] reference to another object. Property lookups traverse up this prototype chain until found or null is reached.

#javascript#prototypes
Learn
javascript
intermediate 8m

Event Bubbling, Capturing, and Event Delegation

Event Delegation is a pattern where a single event listener is attached to a parent element to handle events on its current and future children, leveraging DOM event propagation (bubbling).

#javascript#dom
Learn
javascript
advanced 9m

Building React-like Class Components from Scratch (ES5 Prototypes & Mounting)

Building React-like components in ES5 involves creating a base `Component` constructor function with `setState` and `render` on `Component.prototype`, implementing prototype inheritance via `Object.create`, and wiring a micro-reconciler to mount and re-render the DOM tree.

#javascript#es5
Learn