
Functions
Implement a Promise From Scratch in JavaScript
Implement a Promise from scratch in JavaScript with states, then chaining, microtask timing, thenable resolution and rejection, and the Promises/A+ rules.
8 min read
Tag
38 posts

Implement a Promise from scratch in JavaScript with states, then chaining, microtask timing, thenable resolution and rejection, and the Promises/A+ rules.

Write JSON.stringify from scratch in JavaScript, with string escaping, nested values, undefined and function rules, toJSON, indentation and cycles. Node.js 24.