Tagged articles
106 articles
Page 1 of 2
JavaScript
JavaScript
Jan 5, 2026 · Backend Development

Eliminate Nested try…catch: Go‑Style Error Handling for Async/Await

This article explains how the traditional try…catch pattern in JavaScript async/await can lead to deeply nested, hard‑to‑read code and introduces a Go‑inspired error‑handling helper that returns [error, data] tuples, flattening logic, reducing boilerplate, and improving readability.

Error HandlingGo styleJavaScript
0 likes · 7 min read
Eliminate Nested try…catch: Go‑Style Error Handling for Async/Await
JavaScript
JavaScript
Dec 29, 2025 · Frontend Development

Master Concurrent JavaScript: Replace Promise.all with Promise.allSettled

While Promise.all is the traditional way to run multiple asynchronous operations in JavaScript, it aborts the whole batch when any promise rejects, making it impossible to know which calls succeeded; Promise.allSettled overcomes this by waiting for all promises and providing a detailed status for each result.

AsynchronousJavaScriptPromise
0 likes · 5 min read
Master Concurrent JavaScript: Replace Promise.all with Promise.allSettled
JavaScript
JavaScript
Dec 25, 2025 · Frontend Development

Boost JavaScript Async Performance by Up to 80% with Advanced Promise Techniques

This article explains why async/await can introduce performance overhead, then presents four optimized Promise‑based patterns—including chain optimization, Promise.all parallelism, batch processing, and pooling—that can improve JavaScript asynchronous code speed by up to 80% in high‑frequency or large‑scale scenarios.

JavaScriptPromiseasync/await
0 likes · 5 min read
Boost JavaScript Async Performance by Up to 80% with Advanced Promise Techniques
JavaScript
JavaScript
Dec 12, 2025 · Frontend Development

Why try‑catch Fails in Async JavaScript and How Promise.try Solves It

This article explains the shortcomings of traditional try‑catch for asynchronous JavaScript errors, illustrates the complexity of mixing Promise.catch with sync code, and introduces Promise.try as a unified, micro‑task‑aware solution that simplifies error handling across both synchronous and asynchronous contexts.

Error HandlingJavaScriptPromise
0 likes · 4 min read
Why try‑catch Fails in Async JavaScript and How Promise.try Solves It
JavaScript
JavaScript
Oct 28, 2025 · Frontend Development

Why Promise.allFails and How Promise.allSettled Solves It

Promise.all stops all concurrent operations when any promise rejects, leaving you unaware of which tasks succeeded; using Promise.allSettled instead lets you wait for every promise to settle, providing a detailed result array that distinguishes fulfilled values from rejected reasons, enabling resilient async workflows.

JavaScriptPromisePromise.allSettled
0 likes · 5 min read
Why Promise.allFails and How Promise.allSettled Solves It
JavaScript
JavaScript
Oct 25, 2025 · Frontend Development

Replace Nested try…catch with Go‑Style Error Handling in JavaScript

This article explains how async/await simplifies asynchronous JavaScript but still requires try…catch, and shows how to adopt Go‑style error handling with a tiny helper that returns [error, data] to flatten code, reduce boilerplate, and improve readability.

Error HandlingGo styleJavaScript
0 likes · 9 min read
Replace Nested try…catch with Go‑Style Error Handling in JavaScript
JavaScript
JavaScript
Oct 14, 2025 · Frontend Development

Boost JavaScript Async Performance by Up to 80% with New Promise Techniques

While async/await simplifies JavaScript code, it can introduce significant overhead in high‑frequency or compute‑heavy scenarios; this article introduces alternative async patterns—optimized Promise chaining, parallel Promise.all, batch processing, and pooling—that can reduce context switches and deliver performance gains of up to 80%.

JavaScriptParallelismPerformance Optimization
0 likes · 5 min read
Boost JavaScript Async Performance by Up to 80% with New Promise Techniques
JavaScript
JavaScript
Sep 30, 2025 · Frontend Development

Why Promise.allSettled Beats Promise.all for Robust Async JavaScript

This article explains the limitations of Promise.all, demonstrates how Promise.allSettled handles both fulfilled and rejected promises without aborting the whole operation, and shows practical code examples for building more resilient JavaScript applications.

AsynchronousJavaScriptPromise
0 likes · 5 min read
Why Promise.allSettled Beats Promise.all for Robust Async JavaScript
JavaScript
JavaScript
Sep 23, 2025 · Frontend Development

Transform Async/Await Error Handling with Go‑Style Patterns in JavaScript

This article explains how the traditional try...catch approach for async/await can lead to nested, hard‑to‑read code and introduces a Go‑style error‑handling helper that returns [error, data] tuples, flattening logic, reducing boilerplate, and improving readability when combined with Promise.all.

Error HandlingGo styleJavaScript
0 likes · 8 min read
Transform Async/Await Error Handling with Go‑Style Patterns in JavaScript
JavaScript
JavaScript
Sep 16, 2025 · Frontend Development

Boost JavaScript Async Performance: Up to 80% Faster Than async/await

This article explains why async/await can cause performance bottlenecks in JavaScript and introduces optimized Promise‑based techniques—such as chain optimization, Promise.all parallelism, batch processing, and pooling—that can improve async execution speed by up to 80% in specific scenarios.

JavaScriptParallelismPerformance Optimization
0 likes · 4 min read
Boost JavaScript Async Performance: Up to 80% Faster Than async/await
JavaScript
JavaScript
Aug 21, 2025 · Frontend Development

Avoid UI Crashes: Mastering Promise.all vs. Promise.allSettled in JavaScript

When fetching multiple APIs concurrently, Promise.all aborts all results if any request fails, leading to poor user experience, whereas Promise.allSettled returns outcomes for every promise without rejecting, allowing graceful handling of partial failures and more robust UI rendering.

JavaScriptPromisefrontend
0 likes · 5 min read
Avoid UI Crashes: Mastering Promise.all vs. Promise.allSettled in JavaScript
JavaScript
JavaScript
Jul 20, 2025 · Frontend Development

What Does an async Function Actually Return? Uncover the Promise Mechanics

This article explains how async functions always return a Promise—whether they return a plain value, an explicit Promise, throw an error, or omit a return—detailing the automatic wrapping, unwrapping, and error handling mechanisms that underpin async/await in JavaScript.

Error HandlingJavaScriptPromise
0 likes · 6 min read
What Does an async Function Actually Return? Uncover the Promise Mechanics
JavaScript
JavaScript
Jul 18, 2025 · Frontend Development

Why Does async/await Appear to Block Page Rendering? The Real Reason Explained

This article explains why using async/await inside a loop can make a page seem frozen, clarifies that await itself does not block the main thread, and shows how to replace serial awaits with Promise.all and other concurrency tools for truly non‑blocking UI updates.

JavaScriptPromiseasync/await
0 likes · 8 min read
Why Does async/await Appear to Block Page Rendering? The Real Reason Explained
JavaScript
JavaScript
Jul 2, 2025 · Frontend Development

Why try...catch Misses Promise Errors and How async/await Solves It

This article explains why a traditional try...catch block cannot catch asynchronous Promise rejections in JavaScript, illustrates the sync‑async mismatch with a food‑delivery analogy, and shows how using async/await or .catch() correctly handles such errors.

Error HandlingJavaScriptPromise
0 likes · 6 min read
Why try...catch Misses Promise Errors and How async/await Solves It
JavaScript
JavaScript
Jun 30, 2025 · Frontend Development

Why forEach + async/await Breaks and How to Properly Await in JavaScript

This article explains why combining forEach with async/await leads to unexpected immediate execution, analyzes the underlying behavior of forEach, and presents three reliable patterns—sequential for...of loops, parallel Promise.all with map, and traditional for loops—to correctly handle asynchronous operations in JavaScript.

/loopJavaScriptPromise
0 likes · 7 min read
Why forEach + async/await Breaks and How to Properly Await in JavaScript
JavaScript
JavaScript
Jun 16, 2025 · Frontend Development

5 Hidden JavaScript Pitfalls That Can Break Your Code

This article uncovers five subtle JavaScript pitfalls—including async/await errors, Promise.all fail‑fast behavior, array mutation during iteration, closure‑induced memory leaks, and shallow versus deep copying—providing clear examples and best‑practice solutions to write more robust, predictable code.

JavaScriptPromisearray iteration
0 likes · 10 min read
5 Hidden JavaScript Pitfalls That Can Break Your Code
JavaScript
JavaScript
Jun 13, 2025 · Frontend Development

How to Cancel Ongoing Promises in JavaScript with AbortController

This article explains why native JavaScript Promises cannot be cancelled, introduces the AbortController API as the standard solution, and provides practical examples for using it with fetch and custom asynchronous functions to safely abort operations and improve application robustness.

AbortControllerJavaScriptPromise
0 likes · 6 min read
How to Cancel Ongoing Promises in JavaScript with AbortController
JavaScript
JavaScript
May 19, 2025 · Frontend Development

Mastering Promise Concurrency: Alternatives to Promise.all in JavaScript

While Promise.all is a common way to run multiple promises concurrently, it fails when any promise rejects and offers no control over the number of simultaneous executions; this article explores its limitations and presents elegant alternatives such as Promise.allSettled, simple queue implementations, and libraries like p-limit for effective concurrency management.

JavaScriptPromisePromise.allSettled
0 likes · 3 min read
Mastering Promise Concurrency: Alternatives to Promise.all in JavaScript
JavaScript
JavaScript
May 9, 2025 · Frontend Development

Why Fetch API Beats Ajax: Simplify Your Web Requests Today

This article compares the traditional XMLHttpRequest‑based Ajax approach with the modern fetch API, highlighting fetch's Promise‑based syntax, streamlined configuration, flexible response handling, abort capabilities, and important considerations for cookies, error handling, and timeouts.

HTTP requestsJavaScriptPromise
0 likes · 5 min read
Why Fetch API Beats Ajax: Simplify Your Web Requests Today
JavaScript
JavaScript
Apr 28, 2025 · Frontend Development

Why try‑catch Fails in Async JavaScript and How Promise.try Solves It

This article explains the limitations of traditional try‑catch for asynchronous JavaScript errors, demonstrates how Promise.try unifies sync and async error handling, and shows its advantages with code examples and micro‑task scheduling benefits.

AsyncError HandlingJavaScript
0 likes · 4 min read
Why try‑catch Fails in Async JavaScript and How Promise.try Solves It
JavaScript
JavaScript
Apr 11, 2025 · Frontend Development

Boost JavaScript Async Performance by Up to 80% with New Patterns

This article examines the performance drawbacks of JavaScript's async/await, introduces optimized Promise chaining, parallel execution with Promise.all, batch processing, and a Promise pooling technique, and presents benchmark results showing up to 80% speed improvements in various asynchronous scenarios.

AsyncJavaScriptPromise
0 likes · 5 min read
Boost JavaScript Async Performance by Up to 80% with New Patterns
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Apr 6, 2025 · Frontend Development

Error Handling Strategies for async/await in JavaScript

This article explains the fundamentals of async/await in JavaScript, compares it with callbacks and promises, and presents various error‑handling approaches such as try/catch, Promise.catch, combined await‑catch, and global rejection listeners, helping developers choose the most suitable strategy for their projects.

JavaScriptPromiseasync/await
0 likes · 9 min read
Error Handling Strategies for async/await in JavaScript
JavaScript
JavaScript
Mar 12, 2025 · Frontend Development

Why Fetch API Is Replacing Ajax: 5 Powerful Advantages for Modern Frontend

The article explains how the Fetch API, with its Promise-based syntax, robust request/response abstractions, fine-grained control, abort capabilities, and improved error handling, offers a cleaner, more flexible alternative to traditional Ajax for frontend developers.

AbortControllerAjax replacementPromise
0 likes · 3 min read
Why Fetch API Is Replacing Ajax: 5 Powerful Advantages for Modern Frontend
JavaScript
JavaScript
Mar 6, 2025 · Frontend Development

Why Promise.allSettled Beats Promise.all for Robust Async JavaScript

Promise.allSettled overcomes the fatal flaw of Promise.all by waiting for all promises to settle—whether fulfilled or rejected—returning a uniform result array that lets developers identify successful outcomes and handle failures without aborting the entire operation, enabling more resilient asynchronous code.

AsyncJavaScriptPromise
0 likes · 3 min read
Why Promise.allSettled Beats Promise.all for Robust Async JavaScript
JavaScript
JavaScript
Feb 7, 2025 · Frontend Development

Mastering Promise Concurrency: Techniques to Control Async Tasks in JavaScript

This article explains how to manage Promise concurrency in JavaScript, covering built‑in methods like Promise.all, allSettled, race, any, custom throttling functions, third‑party libraries, generator‑based solutions, and message‑queue approaches to improve performance and user experience.

AsyncJavaScriptPromise
0 likes · 8 min read
Mastering Promise Concurrency: Techniques to Control Async Tasks in JavaScript
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Jan 12, 2025 · Frontend Development

Understanding and Implementing Vue's nextTick Mechanism

This article explains the inner workings of Vue's nextTick function, detailing its callback queue, flushing logic, timer selection across environments, Promise‑based return, and provides a step‑by‑step JavaScript implementation with test cases and the full Vue source code.

AsyncJavaScriptPromise
0 likes · 10 min read
Understanding and Implementing Vue's nextTick Mechanism
JavaScript
JavaScript
Dec 23, 2024 · Frontend Development

Unlock ES2024: 8 Game-Changing JavaScript Features You Must Try

This article introduces eight powerful ES2024 JavaScript enhancements—including Promise.withResolvers, ArrayBuffer.transfer, Unicode string utilities, the regex v flag, Object.groupBy, Atomics.waitAsync, and new non‑mutating array methods—explaining their usage, benefits, and performance impact for modern web development.

ArrayBufferAtomicsJavaScript
0 likes · 6 min read
Unlock ES2024: 8 Game-Changing JavaScript Features You Must Try
JavaScript
JavaScript
Nov 21, 2024 · Frontend Development

Why Promise.try Simplifies Async Error Handling in JavaScript

This article explains how Promise.try provides a cleaner, more consistent way to handle both synchronous and asynchronous errors in JavaScript, eliminating the need for repetitive try‑catch blocks and improving code readability.

JavaScriptPromisefrontend
0 likes · 4 min read
Why Promise.try Simplifies Async Error Handling in JavaScript
Taobao Frontend Technology
Taobao Frontend Technology
Nov 4, 2024 · Frontend Development

What New ECMAScript Proposals Will Shape JavaScript in 2023?

This article reviews the latest Stage 4 ECMAScript proposals—including ArrayBuffer transfer, iterator helpers, RegExp modifiers, import attributes, Promise.try, duplicate named capture groups, and Set methods—explaining their purpose, syntax, and example usage for modern JavaScript development.

ArrayBufferECMAScriptIterator
0 likes · 13 min read
What New ECMAScript Proposals Will Shape JavaScript in 2023?
Full-Stack Cultivation Path
Full-Stack Cultivation Path
Sep 18, 2024 · Fundamentals

How the New JavaScript Safe Assignment Operator Eliminates try‑catch

The ECMAScript proposal‑safe‑assignment‑operator introduces the ?= operator, which returns an [error, result] tuple, allowing developers to replace verbose try‑catch blocks with concise, readable error handling that works with async functions, Promises, and any object implementing Symbol.result, while also improving code consistency and safety.

?=Error HandlingJavaScript
0 likes · 8 min read
How the New JavaScript Safe Assignment Operator Eliminates try‑catch
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Jul 29, 2024 · Frontend Development

Ensuring a Single Token Request Across Multiple API Calls with a repeatOnce Function

This article explains how to prevent multiple simultaneous token requests in a web application by using a custom repeatOnce function that caches the token in localStorage and coordinates pending calls through an event emitter, ensuring only the first request fetches the token while others wait for its result.

JavaScriptPromiseToken
0 likes · 5 min read
Ensuring a Single Token Request Across Multiple API Calls with a repeatOnce Function
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Jun 8, 2024 · Backend Development

vowlink: A Lightweight Go Functional Programming Library for Simplifying Complex if‑else Logic

This article introduces vowlink, a Go library that adopts JavaScript‑style Promise concepts to replace tangled if‑else statements with chainable, error‑handled functional constructs, providing a concise, efficient solution for backend developers facing growing business logic complexity.

Promisefunctional programmingif-else optimization
0 likes · 15 min read
vowlink: A Lightweight Go Functional Programming Library for Simplifying Complex if‑else Logic
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
May 27, 2024 · Backend Development

Vowlink: A Lightweight Go Functional Programming Library for Simplifying Complex if‑else Logic

Vowlink is a lightweight Go library that introduces Promise‑like functional programming constructs—such as Then, Catch, Finally, Race, and All—to replace tangled if‑else statements, offering chainable calls, error handling, and concurrency control, thereby improving code readability, maintainability, and execution efficiency for backend services.

LibraryPromisefunctional-programming
0 likes · 15 min read
Vowlink: A Lightweight Go Functional Programming Library for Simplifying Complex if‑else Logic
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Dec 23, 2023 · Frontend Development

Implementing Cancellation and Progress Notification for JavaScript Promises

This article examines advanced JavaScript Promise techniques by presenting practical implementations for cancelling a pending promise and for notifying progress during asynchronous operations, complete with code examples, explanations of underlying concepts, and discussion of their relevance in interviews and real‑world development.

JavaScriptProgressPromise
0 likes · 10 min read
Implementing Cancellation and Progress Notification for JavaScript Promises
New Oriental Technology
New Oriental Technology
Nov 17, 2023 · Frontend Development

axios introduction

Axios is a popular HTTP client for JavaScript that simplifies making HTTP requests, supports promise-based APIs, and offers features like request/response interceptors and automatic JSON data transformation.

HTTP clientJavaScriptPromise
0 likes · 9 min read
axios introduction
ByteFE
ByteFE
Oct 18, 2023 · Frontend Development

Using React’s Built‑in Features to Handle Loading and Error States with Promises

This article explains how to display loading and error states in React by passing Promise objects through props, context, or state libraries, leveraging Suspense, ErrorBoundary, and custom hooks such as usePromise and use to simplify asynchronous UI patterns while avoiding unnecessary re‑renders and side‑effects.

Error BoundaryLoading StatePromise
0 likes · 13 min read
Using React’s Built‑in Features to Handle Loading and Error States with Promises
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Sep 4, 2023 · Frontend Development

Controlling Concurrent Requests in JavaScript with Promise.all, Promise.race, and async/await

This article explains how to manage multiple asynchronous HTTP requests in modern web development by using Promise.all, Promise.race, async/await, manual counters, and third‑party libraries, providing complete code examples and best‑practice recommendations for limiting concurrency and improving application performance.

JavaScriptPromiseWeb Development
0 likes · 8 min read
Controlling Concurrent Requests in JavaScript with Promise.all, Promise.race, and async/await
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Aug 25, 2023 · Frontend Development

Implementing createPromise and createRetryPromise Utility Functions in JavaScript

This article explains the design and step‑by‑step implementation of two JavaScript utility functions—createPromise for exposing a Promise’s resolve/reject handlers and createRetryPromise for adding configurable retry logic—complete with TypeScript typings, detailed code walkthroughs, and a practical network‑request example.

AsyncJavaScriptPromise
0 likes · 11 min read
Implementing createPromise and createRetryPromise Utility Functions in JavaScript
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Aug 2, 2023 · Frontend Development

Implementing a Custom Promise in JavaScript: A Comprehensive Guide

This article provides a step‑by‑step tutorial on building a custom Promise implementation in JavaScript, covering basic functionality, handling of asynchronous logic, chaining, thenable objects, microtasks, error handling, static methods like resolve, reject, all, race, allSettled, any, and additional features such as catch and finally.

AsynchronousCustomImplementationJavaScript
0 likes · 32 min read
Implementing a Custom Promise in JavaScript: A Comprehensive Guide
php Courses
php Courses
May 8, 2023 · Backend Development

Concurrent Requests to Third-Party APIs in Node.js

This article explains how to use Node.js's built‑in http/https modules to call third‑party APIs and demonstrates three concurrency techniques—Promise.all, async/await with Promise.race, and EventEmitter—to perform parallel requests efficiently, including code examples for constructing requests, handling responses, and error management.

EventEmitterHTTPSNode.js
0 likes · 8 min read
Concurrent Requests to Third-Party APIs in Node.js
ByteFE
ByteFE
Mar 20, 2023 · Frontend Development

Understanding the Proposed React “use” Hook: Design, Usage, and Limitations

This article explains the new React "use" hook proposal, covering its background, how to integrate it with Suspense, minimal examples, promise caching, control‑flow usage, design motivations, implementation details, limitations, and the surrounding community debate.

JavaScriptPromiseReact
0 likes · 12 min read
Understanding the Proposed React “use” Hook: Design, Usage, and Limitations
Bilibili Tech
Bilibili Tech
Jan 3, 2023 · Frontend Development

Understanding JavaScript Promises: Concepts, Implementation, and Practical Use Cases

The article traces JavaScript promises from their 1988 origins and early libraries through the Promise/A+ spec and ES6 implementation, explains core rules, demonstrates practical rewrites using chaining, async/await, error handling, cancellation patterns, and parallel execution with Promise.all, offering guidance for robust asynchronous code.

Code ExamplesFront-endJavaScript
0 likes · 17 min read
Understanding JavaScript Promises: Concepts, Implementation, and Practical Use Cases
ByteFE
ByteFE
Dec 12, 2022 · Frontend Development

Understanding JavaScript Asynchronous Mechanisms and the Event Loop

This article explains why JavaScript, despite being single‑threaded, needs asynchronous mechanisms such as the event loop, details macro‑ and micro‑tasks, compares browser and Node.js implementations, and demonstrates common pitfalls and best practices using callbacks, Promise, generator, and async/await patterns.

AsyncJavaScriptNode.js
0 likes · 16 min read
Understanding JavaScript Asynchronous Mechanisms and the Event Loop
ByteFE
ByteFE
Nov 21, 2022 · Frontend Development

Understanding and Mastering JavaScript Promises: Basics, Advanced Usage, and Best Practices

This article provides a comprehensive overview of JavaScript Promises, covering their definition, states, basic usage, error handling, chaining, common APIs, best practices, advanced scenarios such as preloading and cancellation, as well as manual implementation techniques, to help front‑end developers deepen their asynchronous programming skills.

AsyncError HandlingJavaScript
0 likes · 25 min read
Understanding and Mastering JavaScript Promises: Basics, Advanced Usage, and Best Practices
KooFE Frontend Team
KooFE Frontend Team
Oct 31, 2022 · Frontend Development

How React’s New ‘use’ Hook Simplifies Promise Handling in Server and Client Components

React’s newly proposed use hook lets developers consume promises directly in client components and conditionally in loops or blocks, while server components continue to use async/await, offering a unified yet flexible data‑fetching primitive that integrates seamlessly with the JavaScript ecosystem.

Client ComponentsPromiseReact
0 likes · 11 min read
How React’s New ‘use’ Hook Simplifies Promise Handling in Server and Client Components
Tencent Cloud Developer
Tencent Cloud Developer
Sep 28, 2022 · Fundamentals

Understanding C++20 Coroutines: Promise, Await, and Practical Examples

C++20 coroutines turn functions containing co_await, co_yield, or co_return into suspendable tasks, requiring a promise_type that defines get_return_object, initial_suspend, final_suspend, yield_value, return handling, and exception management, while handles manage resumption, and custom awaiters enable asynchronous I/O such as non‑blocking TCP connections.

AsyncC++20Promise
0 likes · 13 min read
Understanding C++20 Coroutines: Promise, Await, and Practical Examples
Taobao Frontend Technology
Taobao Frontend Technology
Jun 23, 2022 · Frontend Development

What the Latest TC39 Proposals Mean for JavaScript Developers

This article reviews recent TC39 proposals—including findLast, Symbol-as-WeakMap keys, JSON.parse source text access, String.dedent, RegExp modifiers, atomic operators, and faster Promise adoption—explaining their stage progress, technical details, and practical code examples for modern JavaScript development.

ECMAScriptJavaScriptPromise
0 likes · 17 min read
What the Latest TC39 Proposals Mean for JavaScript Developers
Tencent IMWeb Frontend Team
Tencent IMWeb Frontend Team
Apr 25, 2022 · Frontend Development

Master JavaScript Promises: Build Your Own From Scratch

This article explains what a JavaScript Promise is, why it solves callback‑hell in asynchronous code, details its three states, and walks through a complete hand‑written implementation—including the constructor, then method, resolvePromise logic, and how to verify compliance with the Promises/A+ test suite.

AsyncJavaScriptPromise
0 likes · 15 min read
Master JavaScript Promises: Build Your Own From Scratch
IT Services Circle
IT Services Circle
Apr 11, 2022 · Frontend Development

Recommended ESLint Rules for Writing Good Asynchronous JavaScript Code

This article presents a collection of ESLint rules for JavaScript asynchronous programming, explaining why patterns like async promise executors, awaiting in loops, returning values from Promise constructors, and others should be avoided, and provides correct code examples to improve readability, performance, and error handling.

AsyncESLintJavaScript
0 likes · 8 min read
Recommended ESLint Rules for Writing Good Asynchronous JavaScript Code
Selected Java Interview Questions
Selected Java Interview Questions
Nov 25, 2021 · Frontend Development

Refactoring Examples for Common Business Scenarios: From Callback Hell to Promise.all and Pure Functions

This article demonstrates how to refactor tangled asynchronous request chains and complex if‑else logic in JavaScript by replacing callback hell with Promise.all and async/await, extracting pure helper functions, and applying best‑practice principles to improve readability, testability, and maintainability.

JavaScriptPromisePure Functions
0 likes · 11 min read
Refactoring Examples for Common Business Scenarios: From Callback Hell to Promise.all and Pure Functions
Open Source Tech Hub
Open Source Tech Hub
Aug 18, 2021 · Frontend Development

Mastering JavaScript Promises: Concepts, Usage, and Common Pitfalls

This article explains what JavaScript Promises are, their three immutable states, typical use‑cases for handling asynchronous operations, practical syntax and examples—including then and catch methods—while also highlighting their advantages over callback hell and their inherent limitations.

JavaScriptPromisecatch
0 likes · 9 min read
Mastering JavaScript Promises: Concepts, Usage, and Common Pitfalls
Sohu Tech Products
Sohu Tech Products
Jun 16, 2021 · Frontend Development

Implementing Promises in JavaScript: Specification, Code Walkthrough, and Interview Guide

This article explains the evolution of JavaScript asynchronous programming, details the Promise/A+ specification, provides step‑by‑step custom Promise implementations with full code examples, covers additional Promise methods, and offers interview questions and best‑practice tips for frontend developers.

AsynchronousJavaScriptPromise
0 likes · 18 min read
Implementing Promises in JavaScript: Specification, Code Walkthrough, and Interview Guide
ByteFE
ByteFE
Apr 7, 2021 · Frontend Development

Promise‑Based JavaScript Animation Library: Design and Implementation

This article introduces a Promise‑based JavaScript animation library, explains how to create sequential animations using async/await, provides polyfills for requestAnimationFrame and es6‑promise, details the Animator class implementation, and demonstrates usage with code examples and easing extensions.

AnimatorJavaScriptPolyfill
0 likes · 11 min read
Promise‑Based JavaScript Animation Library: Design and Implementation
Laravel Tech Community
Laravel Tech Community
Feb 21, 2021 · Frontend Development

Refactoring Examples for Dependent Requests and Complex If‑Else Logic in JavaScript

This article presents practical refactoring techniques for JavaScript code, illustrating how to replace callback‑hell request chains with Promise.all and async/await, transform tangled if‑else blocks into pure, modular functions, and adopt clean‑code principles to improve readability, testability, and maintainability.

AsyncJavaScriptPromise
0 likes · 10 min read
Refactoring Examples for Dependent Requests and Complex If‑Else Logic in JavaScript
37 Mobile Game Tech Team
37 Mobile Game Tech Team
Dec 1, 2020 · Fundamentals

Mastering JavaScript Promises: From Scratch to Full A+ Implementation

This article walks you through building a fully functional Promise library in JavaScript, starting with a basic implementation, then adding asynchronous handling, chaining, state management, error handling, and finally aligning with the Promise/A+ specification, complete with code examples and testing guidance.

A+ SpecificationAsyncJavaScript
0 likes · 15 min read
Mastering JavaScript Promises: From Scratch to Full A+ Implementation
政采云技术
政采云技术
Nov 17, 2020 · Frontend Development

Writing High-Quality Maintainable Code: Asynchronous Optimization

This article explains the various asynchronous techniques in JavaScript—callback, Promise, async/await, and generator—compares them, and demonstrates practical patterns for handling callback hell, parallel and sequential async operations to write cleaner, more maintainable frontend code.

AsyncPromisecallback
0 likes · 10 min read
Writing High-Quality Maintainable Code: Asynchronous Optimization
Sohu Tech Products
Sohu Tech Products
Oct 21, 2020 · Frontend Development

Key New Features of ES2020 (ES11): Private Fields, Promise.allSettled, BigInt, Nullish Coalescing, Optional Chaining, Dynamic Import, matchAll, globalThis, and Module Namespace Exports

This article reviews the most useful ES2020 (ES11) JavaScript features—including private class fields, Promise.allSettled, the BigInt type, nullish coalescing (??), optional chaining (?.), dynamic import, String.prototype.matchAll, globalThis, and module namespace exports—explaining their syntax, behavior, and practical code examples.

BIGINTDynamicImportES2020
0 likes · 12 min read
Key New Features of ES2020 (ES11): Private Fields, Promise.allSettled, BigInt, Nullish Coalescing, Optional Chaining, Dynamic Import, matchAll, globalThis, and Module Namespace Exports
37 Interactive Technology Team
37 Interactive Technology Team
May 9, 2020 · Frontend Development

Understanding Asynchronous Programming in JavaScript: Event Loop, Tasks, and Promise Implementation

The article explains JavaScript’s single‑threaded nature and how asynchronous programming—using callbacks, timers, Ajax, and Promises—relies on the event loop to manage macro‑tasks and micro‑tasks, illustrates execution order, warns against callback hell, and provides a custom Promise implementation.

JavaScriptMicrotaskPromise
0 likes · 14 min read
Understanding Asynchronous Programming in JavaScript: Event Loop, Tasks, and Promise Implementation
vivo Internet Technology
vivo Internet Technology
May 6, 2020 · Frontend Development

In‑Depth Implementation of JavaScript Promise: Prototype Methods, Error Handling, and Finally

This article walks through a step‑by‑step construction of a fully‑featured JavaScript Promise, detailing prototype methods, chainable then, reject handling, catch alias, and a standards‑compliant finally implementation, while illustrating each stage with code snippets, flowcharts, and animated visualizations.

AsynchronousError HandlingPromise
0 likes · 10 min read
In‑Depth Implementation of JavaScript Promise: Prototype Methods, Error Handling, and Finally
vivo Internet Technology
vivo Internet Technology
Apr 15, 2020 · Frontend Development

How to Build Real Promise Chains: From Basics to Full Implementation

This article walks through the step‑by‑step creation of a JavaScript Promise implementation, explains why true chaining requires returning a new Promise from then, demonstrates mock asynchronous calls, and provides detailed code examples and execution logs to illustrate the complete chain behavior.

AsyncChainJavaScript
0 likes · 13 min read
How to Build Real Promise Chains: From Basics to Full Implementation
vivo Internet Technology
vivo Internet Technology
Mar 25, 2020 · Frontend Development

Understanding and Implementing JavaScript Promise: From Basic Construction to State Management

This article walks developers through building a functional JavaScript Promise from scratch, starting with a minimal callback list, adding chainable then calls, introducing a micro‑task delay to handle early resolves, and finally implementing state management so callbacks added after fulfillment still execute correctly.

AsynchronousPromiseimplementation
0 likes · 10 min read
Understanding and Implementing JavaScript Promise: From Basic Construction to State Management
WecTeam
WecTeam
Nov 12, 2019 · Frontend Development

Deep Dive into Promise Microtasks: How .then Registers and Executes

This article thoroughly dissects JavaScript Promise execution, revealing how microtasks are registered and run across multiple code snippets, compares Promise/A+ with WebKit implementations, and provides detailed code analyses and output predictions to help developers master Promise behavior.

AsyncJavaScriptPromise
0 likes · 14 min read
Deep Dive into Promise Microtasks: How .then Registers and Executes
Sohu Tech Products
Sohu Tech Products
Aug 7, 2019 · Frontend Development

Understanding JavaScript Promises: Concepts, API, and Practical Examples

This article explains JavaScript Promises, covering their purpose in avoiding callback hell, the core API (constructor, then, catch, static methods), practical code examples, chaining behavior, comparison with callbacks and async/await, and even a custom implementation, providing a comprehensive guide for frontend developers.

AsynchronousJavaScriptPromise
0 likes · 25 min read
Understanding JavaScript Promises: Concepts, API, and Practical Examples
21CTO
21CTO
Aug 4, 2019 · Frontend Development

What’s New in Electron 6.0? Exploring the Latest Promise Features and API Updates

Electron 6.0, the newest stable release, brings Chromium 76, Node.js 12.4, V8 7.6, enhanced Promise support, async dialog APIs, new shell.showItemInFolder, and numerous API improvements such as excludedFromShownWindowsMenu, all_frames support, Linux preview, Touch ID, and more, all installable via npm.

APIDesktop AppsElectron
0 likes · 4 min read
What’s New in Electron 6.0? Exploring the Latest Promise Features and API Updates
Xueersi Online School Tech Team
Xueersi Online School Tech Team
Jul 12, 2019 · Fundamentals

Understanding Google V8 Engine Promise Implementation and the JavaScript Event Loop

This article explains the evolution of Google V8's Promise implementation, details the JavaScript single‑threaded event loop with macro‑ and micro‑tasks, describes various programming models, and walks through the internal V8 code that realizes Promise construction, chaining, and utility methods such as Promise.all and Promise.race.

AsyncJavaScriptPromise
0 likes · 10 min read
Understanding Google V8 Engine Promise Implementation and the JavaScript Event Loop
MaoDou Frontend Team
MaoDou Frontend Team
Jul 2, 2019 · Frontend Development

Mastering JavaScript Promises: Event Loop, Tasks, and Advanced Patterns

This article explains JavaScript’s event mechanism, distinguishes macro‑ and micro‑tasks, and provides a comprehensive guide to using Promises—including their states, API methods like then, catch, finally, and utilities such as all, race, with practical code examples and common pitfalls.

AsyncJavaScriptPromise
0 likes · 12 min read
Mastering JavaScript Promises: Event Loop, Tasks, and Advanced Patterns
Beike Product & Technology
Beike Product & Technology
Jun 14, 2019 · Frontend Development

Understanding Axios CancelToken Mechanism and Solving Data Mixing When Rapidly Switching Vue H5 Routes

This article analyzes a bug where rapid route switching in a Vue H5 project caused data from different routes to mix, explains how Axios CancelToken works, shows the implementation of request cancellation via interceptors, and discusses deeper insights and further possibilities for frontend developers.

CancelTokenInterceptorPromise
0 likes · 11 min read
Understanding Axios CancelToken Mechanism and Solving Data Mixing When Rapidly Switching Vue H5 Routes
360 Tech Engineering
360 Tech Engineering
May 14, 2019 · Frontend Development

What’s New in JavaScript: V8 Performance Boosts and New Language Features

The article summarizes the latest JavaScript enhancements presented by the V8 team at Google I/O, covering massive async performance gains, new engine components like TurboFan and Orinoco, and a suite of language features such as class fields, private members, numeric separators, bigint, extended Intl APIs, top‑level await, Promise.allSettled/any, and WeakRef, illustrated with practical code examples.

AsyncJavaScriptPromise
0 likes · 12 min read
What’s New in JavaScript: V8 Performance Boosts and New Language Features
MaoDou Frontend Team
MaoDou Frontend Team
Feb 25, 2019 · Frontend Development

Master JavaScript Promises: From Basics to Advanced API

This article explains what JavaScript Promises are, their immutable states, advantages and drawbacks, details the constructor, instance and static methods, provides code examples, and walks through the source implementations of resolve, reject, all, and race.

APIAsynchronousJavaScript
0 likes · 8 min read
Master JavaScript Promises: From Basics to Advanced API
UC Tech Team
UC Tech Team
Jan 21, 2019 · Frontend Development

New ES2018 Features Every JavaScript Developer Should Know

The article introduces the major ES2018 additions—including rest/spread properties, asynchronous iteration, Promise.prototype.finally, and four RegExp enhancements—explains their syntax and usage with examples, and lists Node.js versions that support each feature, helping developers adopt the latest JavaScript capabilities.

ES2018JavaScriptNode.js
0 likes · 13 min read
New ES2018 Features Every JavaScript Developer Should Know
Tencent IMWeb Frontend Team
Tencent IMWeb Frontend Team
Oct 23, 2018 · Frontend Development

Mastering JavaScript Macrotasks, Microtasks, and Promise Timing

This article explains the differences between macrotasks and microtasks in the JavaScript event loop, shows how they affect Promise execution, provides practical code examples, and discusses how frameworks like Vue implement task scheduling, helping developers avoid dead‑loops and improve performance.

JavaScriptPromiseevent loop
0 likes · 13 min read
Mastering JavaScript Macrotasks, Microtasks, and Promise Timing
Qunar Tech Salon
Qunar Tech Salon
Aug 1, 2018 · Frontend Development

Understanding JavaScript Asynchronous Patterns and Core Language Features for React Native Development

This article provides a comprehensive guide for mobile developers on JavaScript fundamentals such as callback hell, Promises, async/await, the arguments object, call and apply methods, mixins, and prototype inheritance, illustrating each concept with clear explanations and practical code examples to improve React Native coding practices.

AsyncCallApplyJavaScript
0 likes · 16 min read
Understanding JavaScript Asynchronous Patterns and Core Language Features for React Native Development
JD Tech
JD Tech
Jun 28, 2018 · Backend Development

Asynchronous Programming and Promise Patterns in Backend Systems

This article introduces the concepts of synchronous versus asynchronous calls, explains the challenges of RPC services in large-scale systems, and provides detailed guidance on using polling, callbacks, futures, and CompletableFuture in Java to implement efficient, non‑blocking backend architectures with practical code examples.

BackendFutureJava
0 likes · 18 min read
Asynchronous Programming and Promise Patterns in Backend Systems
JD Tech
JD Tech
May 10, 2018 · Backend Development

Asynchronous Programming and Promise Patterns in Backend Services

This article introduces the concepts of synchronous vs asynchronous calls, explains RPC and I/O models, and demonstrates how to use callback, Future/Promise, and ReactiveX styles with Java's CompletableFuture and Guava's ListenableFuture to improve performance and scalability of backend services.

AsynchronousBackendFuture
0 likes · 17 min read
Asynchronous Programming and Promise Patterns in Backend Services
Tencent IMWeb Frontend Team
Tencent IMWeb Frontend Team
Feb 8, 2018 · Frontend Development

How Does JavaScript’s Promise Work Under the Hood? A Deep Dive

This article walks through the inner mechanics of JavaScript Promises, explaining their basic prototype, asynchronous handling with the event loop, state management, chainable behavior, and error handling, all illustrated with step‑by‑step code examples and diagrams.

AsynchronousDesign PatternsJavaScript
0 likes · 10 min read
How Does JavaScript’s Promise Work Under the Hood? A Deep Dive
Tencent IMWeb Frontend Team
Tencent IMWeb Frontend Team
Feb 6, 2018 · Frontend Development

Why Switch to Fetch API? A Frontend Guide to Modern AJAX

This article compares the traditional XMLHttpRequest‑based AJAX approach with the modern Fetch API, highlighting its Promise‑based design, cleaner syntax, better compatibility strategies, common pitfalls, and practical usage tips for frontend developers.

JavaScriptPromiseajax
0 likes · 4 min read
Why Switch to Fetch API? A Frontend Guide to Modern AJAX
Hujiang Technology
Hujiang Technology
Dec 20, 2017 · Frontend Development

Understanding WeChat Mini Programs: Runtime, Promise Wrapping, Componentization, and Redux Integration

This article explains the differences between WeChat Mini Programs and H5, details the custom runtime environment, demonstrates performance differences, shows how to wrap callback‑based APIs with Promises, introduces component‑based development, and integrates Redux for state management with code examples.

ComponentizationPromiseRedux
0 likes · 14 min read
Understanding WeChat Mini Programs: Runtime, Promise Wrapping, Componentization, and Redux Integration
Hujiang Technology
Hujiang Technology
Nov 1, 2017 · Backend Development

Understanding and Implementing Promisify in JavaScript

Promisify converts Node‑style callback functions into Promise‑based ones by ensuring the callback is the last argument and its first parameter is an error, enabling cleaner asynchronous code with examples, implementation details, and optimizations for JavaScript developers.

AsynchronousJavaScriptNode.js
0 likes · 5 min read
Understanding and Implementing Promisify in JavaScript
BiCaiJia Technology Team
BiCaiJia Technology Team
Sep 9, 2017 · Frontend Development

Master ES6 Promises: From Basics to Advanced Chaining Techniques

This article introduces ES6 Promise, explains its constructor, resolve and reject mechanisms, demonstrates chaining with then, error handling with catch, and shows advanced utilities like Promise.all and Promise.race, all illustrated with clear code examples and visual diagrams for JavaScript developers.

AsynchronousPromisees6
0 likes · 10 min read
Master ES6 Promises: From Basics to Advanced Chaining Techniques
Node Underground
Node Underground
Jun 22, 2017 · Backend Development

8 Essential Node.js Practices Every Backend Developer Should Follow

This article presents eight practical recommendations for Node.js developers, covering dependency locking, lifecycle scripts, modern JavaScript, promises with async/await, code formatting with Prettier, continuous integration testing, security headers via Helmet, and serving over HTTPS.

HTTPSNode.jsPrettier
0 likes · 4 min read
8 Essential Node.js Practices Every Backend Developer Should Follow
Tencent IMWeb Frontend Team
Tencent IMWeb Frontend Team
May 21, 2017 · Frontend Development

Master JavaScript Event Loop: From Basics to Advanced Examples

This article explains the JavaScript event loop in depth, covering execution contexts, call stacks, macro‑ and micro‑tasks, and how APIs like setTimeout, Promise, process.nextTick, and setImmediate interact, using clear diagrams and step‑by‑step examples for both browsers and Node.js.

AsyncNode.jsPromise
0 likes · 12 min read
Master JavaScript Event Loop: From Basics to Advanced Examples