Tagged articles
Promises
28 articles · Page 1 of 1
This article dissects 10 common misconceptions about JavaScript's await keyword, explaining how it evaluates expressions, waits only for Promise settlement — not side effects — and why patterns like forEach with async callbacks, bare setTimeout, and Promise.all can cause silent bugs in production.
Async/AwaitConcurrencyJavaScript
0 likes · 16 min read

Async programming boosts efficiency by allowing tasks to run while waiting for I/O, and this guide explores eight common implementations—callbacks, Promises, async/await, event emitters, generators, coroutines, ReactiveX, and the Actor model—detailing their advantages, drawbacks, suitable scenarios, and production‑grade best practices.
CoroutinesPromisesactor model
0 likes · 10 min read

Pokio is a lightweight PHP asynchronous API that enables concurrent task execution using PCNTL and FFI, automatically falling back to sequential mode when unavailable; the guide explains installation via Composer, core functions async, await, then, catch, finally, and provides detailed code examples for promises, chaining, and error handling.
ConcurrencyPromisesasynchronous
0 likes · 5 min read

The article explains how early thread‑blocking models led to the invention of callbacks, why deeply nested callbacks create "callback hell," and how promises/futures and their chaining, as well as coroutines, provide more linear and efficient asynchronous programming for high‑concurrency backend services.
Asynchronous ProgrammingPromisescallback hell
0 likes · 6 min read

The article traces the evolution from blocking thread‑based synchronous code to callback‑driven asynchronous patterns, exposes the pitfalls of callback hell, and shows how promises/futures and their chainable API offer a cleaner, more efficient way to handle high‑concurrency backend operations.
Asynchronous ProgrammingPromisescallbacks
0 likes · 6 min read

This article outlines five frequent async/await error‑handling mistakes developers encounter in production JavaScript code—such as missing try/catch, lost Promise errors, loop handling issues, synchronous errors, and unchecked Promise states—and provides clear, corrected patterns to prevent crashes.
Async/AwaitJavaScriptPromises
0 likes · 5 min read

This article walks through the evolution of JavaScript asynchronous programming—from callback hell to promises and finally async/await—explaining how async/await works, when true synchronous execution is needed, and providing practical techniques and code examples for clean, maintainable async code.
Async/AwaitAsynchronous ProgrammingCode Examples
0 likes · 6 min read

Callback functions, once fundamental to asynchronous JavaScript, suffer from deep nesting, poor error handling, and maintenance challenges, prompting developers to adopt modern alternatives like Promises and async/await, which offer clearer flow, unified error management, and better integration with contemporary frameworks.
Async/AwaitJavaScriptPromises
0 likes · 6 min read

This article outlines eight frequent JavaScript traps—from type coercion and variable hoisting to this binding, closures, numeric precision, array method quirks, Promise misuse, and event‑listener memory leaks—explaining why they occur and how to resolve them.
JavaScriptPromisesbugs
0 likes · 5 min read

This article introduces React 19’s new use hook that reduces reliance on useEffect, explains how to work with resolved promises, demonstrates conditional usage and integration with Suspense through detailed code examples, and discusses practical considerations when using the hook in modern frontend projects.
JavaScriptPromisesReact
0 likes · 9 min read

JavaScript’s single‑threaded nature makes asynchronous programming essential, and this guide explains callbacks, promises (including states and chaining), and async/await syntax with clear examples, illustrating how each technique avoids blocking the main thread and improves code readability and error handling.
Async/AwaitJavaScriptPromises
0 likes · 9 min read


21CTOOct 7, 2024 · Frontend Development
This article reviews the six key ECMAScript 2024 proposals—including well‑formed Unicode strings, asynchronous atomic wait, the new RegExp v flag, ArrayBuffer transfer, array grouping, and Promise.withResolvers—explaining their purpose, API changes, and providing runnable code examples.
ArrayBufferECMAScriptJavaScript
0 likes · 9 min read

This article explains how async/await simplifies callback and Promise code in Node.js, covering async function basics, error handling, retry strategies, parallel execution, array iteration pitfalls, and step‑by‑step refactoring of callback‑ and Promise‑based applications into clear, maintainable async/await code.
Async/AwaitNode.jsPromises
0 likes · 17 min read


21CTOJul 30, 2024 · Frontend Development
The article reviews ECMAScript 2024, highlighting new small‑scale features such as improved WebAssembly interop, enhanced Promise utilities, group‑by methods, better Unicode handling, async locking with Atomics.waitAsync, and resizable ArrayBuffers, while also discussing upcoming proposals for 2025.
ECMAScript 2024JavaScriptPromises
0 likes · 17 min read

The article breaks down modern asynchronous programming by examining four core models—callbacks, Promises, reactive observer patterns, and message‑driven architectures—explaining their mechanics, pros and cons, and providing JavaScript/Dart examples and system diagrams to help developers master non‑blocking concurrency.
Async/AwaitAsynchronous ProgrammingConcurrency
0 likes · 26 min read

The article presents a series of JavaScript ES6 code‑review critiques, explaining why older ES5 patterns are problematic and demonstrating modern ES6 alternatives such as destructuring, spread operators, template literals, optional chaining, async/await, and array methods with clear code examples.
Array MethodsAsync/AwaitDestructuring
0 likes · 8 min read

This article explains the async/await syntax, compares it with traditional Promise chains, and outlines six practical advantages—including conciseness, unified error handling, clearer conditional logic, easier intermediate value handling, better stack traces, and simpler debugging—illustrated with real JavaScript code examples.
Async/AwaitCode ReadabilityDebugging
0 likes · 9 min read

This article explains why proper exception handling is essential for high‑quality JavaScript, contrasts using return codes with real exceptions, shows clean versus dirty code examples, and offers practical guidelines such as defining custom exception hierarchies, handling Promise rejections, and providing contextual error information.
Exception HandlingJavaScriptPromises
0 likes · 10 min read

This article reviews why asynchronous programming is needed, explains continuations, compares callbacks, promises, reactive streams, async/await, and user‑level threads, and shows how each technique reduces I/O blocking and improves concurrency in Java applications.
Async/AwaitAsynchronous ProgrammingConcurrency
0 likes · 13 min read

This article traces JavaScript’s evolution, covering the enrichment of prototype methods, standardization of classes and modules, the rise of asynchronous patterns like callbacks, promises, generators, async/await, and modern syntax features such as block scope, symbols, BigInt, reflection, and useful syntactic sugar.
BIGINTES6JavaScript
0 likes · 28 min read

The article surveys functional programming fundamentals—contrasting it with imperative and declarative styles—and illustrates key concepts such as closures, currying, promises, partial functions, map/reduce, and divmod through Java, JavaScript, and Python examples, before highlighting Scala’s hybrid approach and the advantages of FP for writing elegant, maintainable, concurrent code.
Programming ParadigmsPromisesScala
0 likes · 12 min read

This article walks through the evolution of JavaScript asynchronous patterns—from basic callbacks and their pitfalls, through Promise creation, chaining, and error handling, to the modern async/await syntax—showing how to write clear, maintainable code for real‑world API calls.
Async/AwaitJavaScriptPromises
0 likes · 22 min read

This article explains how JavaScript’s single‑threaded model achieves asynchronous behavior through macro‑tasks and micro‑tasks, compares the browser and Node.js event‑loop implementations, and demonstrates the timing differences between setTimeout, setImmediate, and process.nextTick with practical code examples.
JavaScriptMicrotasksNode.js
0 likes · 9 min read

This article explains how JavaScript arrow functions can make code more concise and simplify handling of the this keyword, covering syntax differences, implicit returns, logging, object returns, practical examples with map, promises, and refactoring techniques for modern web development.
Arrow FunctionsES6Promises
0 likes · 10 min read

This article walks through classic Node.js callback examples, demonstrates how event emitters can replace tangled callback nesting, and then shows how promises and async/await provide cleaner, more maintainable asynchronous code, encouraging developers to upgrade their Node version.
Async/AwaitJavaScriptNode.js
0 likes · 3 min read

This article explores practical ways to handle asynchronous operations in JavaScript, comparing callbacks, async.js, promises, generators, and async/await, and demonstrates how refactoring code can eliminate callback hell and improve readability for both client‑side and server‑side development.
Async/AwaitPromisesasynchronous
0 likes · 2 min read

This article delves into ES6’s advanced features—including dynamic module loading, Symbol usage, iterators, Maps, Sets, Weak collections, Promises, async‑await, generators, and meta‑programming tools like Proxy and Reflect—providing concise explanations, code snippets, and practical guidance for modern JavaScript development.
Async/AwaitES6JavaScript
0 likes · 20 min read

This article shares real‑world Node.js pitfalls—from unsafe decodeURIComponent usage and hidden Promise errors to unhandled HTTP request failures—explaining why they occur and providing practical code‑level solutions such as try‑catch wrappers and proper error event handling to keep applications stable.
BackendHTTPJavaScript
0 likes · 4 min read
