Tagged articles

JavaScript

2473 articles · Page 4 of 25
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
May 14, 2025 · Frontend Development

Front‑End Large File Upload: Principles, Key Features, and Using the enlarge‑file‑upload Library

This article explains the concept of large file upload in front‑end development, outlines the problems it solves, compares it with ordinary uploads, details essential implementation steps such as chunking, parallelism, resume, and integrity checks, and demonstrates practical usage of the enlarge‑file‑upload library across vanilla JavaScript, Vue2, Vue3, and React.

JavaScriptLarge File UploadResumable Upload
0 likes · 18 min read
Front‑End Large File Upload: Principles, Key Features, and Using the enlarge‑file‑upload Library
Senior Tony
Senior Tony
May 13, 2025 · Backend Development

Master WebSocket: From Handshake to Real‑Time Messaging with Java & Spring

This tutorial explains WebSocket’s full‑duplex protocol, compares it with HTTP polling, outlines typical real‑time use cases, details the handshake and frame structure, and provides complete client‑side JavaScript and Spring Boot server examples to help developers quickly implement bi‑directional communication.

JavaScriptReal‑time communicationSpring Boot
0 likes · 9 min read
Master WebSocket: From Handshake to Real‑Time Messaging with Java & Spring
JavaScript
JavaScript
May 12, 2025 · Frontend Development

Why Vue 3 Discourages Mixins and How Composition API Solves Their Problems

The article explains why Vue 3 no longer recommends the Mixins pattern, outlines its drawbacks such as naming conflicts and unclear data origins, and demonstrates how the Composition API provides a clearer, more maintainable alternative for reusable logic.

Composition APIJavaScriptTypeScript
0 likes · 5 min read
Why Vue 3 Discourages Mixins and How Composition API Solves Their Problems
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
May 12, 2025 · Frontend Development

Understanding Browser Rendering, Event Loop, and Techniques to Avoid Page Jank When Adding Massive DOM Elements

This article explains the underlying browser mechanisms that cause page jank when creating millions of DOM elements, analyzes the event loop, rendering pipeline, macro‑ and micro‑tasks, and presents practical solutions such as setTimeout, requestAnimationFrame, MessageChannel, and requestIdleCallback to keep the UI responsive.

BrowserDOMJavaScript
0 likes · 16 min read
Understanding Browser Rendering, Event Loop, and Techniques to Avoid Page Jank When Adding Massive DOM Elements
JavaScript
JavaScript
May 10, 2025 · Frontend Development

How Tree Shaking Trims Your JavaScript Bundle for Faster Loads

This article explains what Tree Shaking is, how it leverages the static nature of ES6 modules to eliminate dead code during bundling, and provides practical tips for developers to maximize bundle size reduction and improve web performance.

ES6 ModulesJavaScriptTree-shaking
0 likes · 9 min read
How Tree Shaking Trims Your JavaScript Bundle for Faster Loads
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.

AJAXFetch APIHTTP requests
0 likes · 5 min read
Why Fetch API Beats Ajax: Simplify Your Web Requests Today
JavaScript
JavaScript
May 8, 2025 · Frontend Development

Modern JavaScript: Replace the arguments Object with Rest, Default, and Destructuring

The legacy arguments object in JavaScript is deprecated due to several drawbacks, and this article explains three modern, more efficient alternatives—rest parameters, default parameters, and destructuring assignment—detailing their advantages, usage examples, and how they improve readability, performance, and flexibility in function parameter handling.

Default ParametersDestructuringFunction Parameters
0 likes · 4 min read
Modern JavaScript: Replace the arguments Object with Rest, Default, and Destructuring
JavaScript
JavaScript
May 7, 2025 · Frontend Development

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

Promise.allSettled enhances JavaScript concurrency by waiting for every promise to settle—whether fulfilled or rejected—so developers can retrieve all results and handle errors more flexibly, unlike Promise.all which aborts on the first rejection.

Asynchronous ProgrammingJavaScriptPromise.allSettled
0 likes · 4 min read
Why Promise.allSettled Beats Promise.all for Robust Async Handling
JavaScript
JavaScript
May 6, 2025 · Frontend Development

Why Sticking to ES5 Is Holding Your JavaScript Back – Modern Alternatives Explained

This article examines common ES5 JavaScript patterns—such as var declarations, mixed function definitions, callback hell, the arguments object, constructor‑based inheritance, string concatenation, and manual loops—and shows how modern ES6+ features like let/const, arrow functions, promises, rest parameters, classes, template literals, spread syntax, and array methods provide cleaner, safer, and more maintainable code.

Arrow FunctionsAsync/AwaitJavaScript
0 likes · 8 min read
Why Sticking to ES5 Is Holding Your JavaScript Back – Modern Alternatives Explained
JavaScript
JavaScript
May 5, 2025 · Frontend Development

Replace Switch Statements with Object Maps and ES6 Map for Cleaner JavaScript

Modern JavaScript offers more elegant alternatives to traditional if‑else and switch statements, such as using object literals for simple mappings and the ES6 Map structure for complex or dynamic key‑value logic, resulting in shorter, less error‑prone, and more maintainable code.

JavaScriptSwitchcode optimization
0 likes · 4 min read
Replace Switch Statements with Object Maps and ES6 Map for Cleaner JavaScript
JavaScript
JavaScript
May 4, 2025 · Frontend Development

Master Cleaner Conditional Logic in JavaScript: 10 Powerful Alternatives

This article examines the drawbacks of traditional if/else and switch statements in JavaScript and presents ten concise, maintainable, and performant alternatives—including ternary operators, short‑circuit evaluation, object and Map lookups, function mapping, strategy pattern, optional chaining, nullish coalescing, and logical grouping—while providing code examples, pros and cons, and a performance comparison.

Conditional LogicJavaScriptfrontend development
0 likes · 11 min read
Master Cleaner Conditional Logic in JavaScript: 10 Powerful Alternatives
JavaScript
JavaScript
May 3, 2025 · Frontend Development

Why Google Engineers Avoid JavaScript Default Parameters (And What to Use Instead)

This article explains the subtle bugs, predictability issues, scope interactions, and readability concerns that can arise from JavaScript default parameters, and presents explicit argument handling and object destructuring as safer alternatives for large‑scale development.

Default ParametersFunction ArgumentsJavaScript
0 likes · 3 min read
Why Google Engineers Avoid JavaScript Default Parameters (And What to Use Instead)
Code Mala Tang
Code Mala Tang
May 3, 2025 · Frontend Development

How Top Engineers Refactor Complex Conditional Logic for Cleaner Code

This article examines why developers often over‑nest and misuse conditional statements, then presents proven techniques—early returns, lookup objects, optional chaining, guard clauses, and state machines—to simplify, improve readability, and make conditional logic more maintainable and scalable.

Conditional LogicJavaScriptRefactoring
0 likes · 8 min read
How Top Engineers Refactor Complex Conditional Logic for Cleaner Code
JavaScript
JavaScript
May 2, 2025 · Frontend Development

Mastering Async/Await: Turn JavaScript Asynchronous Code into Synchronous‑Style Logic

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 ProgrammingJavaScript
0 likes · 6 min read
Mastering Async/Await: Turn JavaScript Asynchronous Code into Synchronous‑Style Logic
JavaScript
JavaScript
May 1, 2025 · Frontend Development

Avoid Common Arrow Function Pitfalls in JavaScript

Arrow functions in ES6 offer concise syntax, but they come with several traps—such as lacking their own this binding, being unusable as constructors, missing arguments, and incompatibility with call/apply/bind—so developers must know when to avoid them and when they’re appropriate.

JavaScriptbest practiceses6
0 likes · 5 min read
Avoid Common Arrow Function Pitfalls in JavaScript
JavaScript
JavaScript
Apr 29, 2025 · Frontend Development

Replace Switch Statements with Object Maps for Cleaner JavaScript

Learn how modern JavaScript lets you replace verbose if‑else and switch statements with concise object literal mappings and the powerful ES6 Map structure, improving readability, reducing errors, and simplifying maintenance for both simple and complex branching logic.

JavaScriptSwitchmap
0 likes · 4 min read
Replace Switch Statements with Object Maps for Cleaner JavaScript
Liangxu Linux
Liangxu Linux
Apr 28, 2025 · Backend Development

How to Fix Cross-Origin Issues with Nginx: A Step‑by‑Step Demo

This guide explains when cross‑origin problems occur, demonstrates a concrete Nginx‑based example with client‑side JavaScript, and shows how to resolve the issue by adding the appropriate Access‑Control‑Allow‑Origin and Access‑Control‑Allow‑Methods headers.

CORSCross-OriginJavaScript
0 likes · 5 min read
How to Fix Cross-Origin Issues with Nginx: A Step‑by‑Step Demo
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.

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

Mastering JavaScript Object Copying: Shallow vs Deep Techniques

Understanding how JavaScript handles object references is crucial, as improper copying can cause unexpected side effects; this guide explains the differences between shallow and deep copies, demonstrates various methods—including Object.assign, spread operator, JSON serialization, lodash, and the native structuredClone API—and offers practical tips for choosing the right strategy.

JavaScriptObject CopyPerformance
0 likes · 10 min read
Mastering JavaScript Object Copying: Shallow vs Deep Techniques
JavaScript
JavaScript
Apr 26, 2025 · Frontend Development

Master JavaScript flatMap: Simplify Array Transformations and Boost Performance

The article explains JavaScript’s flatMap() method, detailing its combination of map() and flat() functionality, syntax, parameters, use‑cases such as flattening nested arrays, filtering and transforming elements, handling one‑to‑many relationships, performance benefits, caveats, and real‑world examples with code snippets.

Data ProcessingJavaScriptPerformance
0 likes · 4 min read
Master JavaScript flatMap: Simplify Array Transformations and Boost Performance
php Courses
php Courses
Apr 24, 2025 · Frontend Development

Six Lesser‑Known Ways to Output Data in JavaScript

This article introduces six alternative JavaScript output techniques—including document.write, advanced console methods, the Notification API, speech synthesis, Blob with URL.createObjectURL, and WebSocket—providing developers with richer options beyond console.log and alert for diverse web scenarios.

JavaScriptWeb APIsconsole
0 likes · 5 min read
Six Lesser‑Known Ways to Output Data in JavaScript
JavaScript
JavaScript
Apr 24, 2025 · Frontend Development

Why for...in Loops Can Break Your JavaScript Arrays and Safer Alternatives

The article explains that JavaScript’s for...in loop, intended for object property enumeration, can produce unordered results, traverse custom and prototype properties, and cause performance and bug issues when used on arrays, and it recommends safer alternatives such as classic for loops, for…of, forEach, and functional methods.

JavaScriptarray iterationbest practices
0 likes · 4 min read
Why for...in Loops Can Break Your JavaScript Arrays and Safer Alternatives
Alibaba Cloud Developer
Alibaba Cloud Developer
Apr 22, 2025 · Artificial Intelligence

Can AI Self‑Upgrade by Writing Its Own Code? A Detective Game Demo

This article showcases how an AI can self‑upgrade by dynamically injecting and executing JavaScript code within a simulated detective game, using an MCP server that provides tools for starting the game, retrieving clues, executing code, and submitting a solution, ultimately identifying the thief through logical reasoning.

AI self‑upgradeJavaScriptMCP server
0 likes · 15 min read
Can AI Self‑Upgrade by Writing Its Own Code? A Detective Game Demo
JavaScript
JavaScript
Apr 21, 2025 · Frontend Development

Why JSON.parse(JSON.stringify) Fails for Deep Cloning and What to Use Instead

This article explains the hidden pitfalls of using JSON.parse(JSON.stringify) for deep cloning in JavaScript—such as circular references, loss of special types, prototype chain, and collection data—while recommending the native structuredClone API as a more reliable alternative.

JavaScriptdeep copyjson
0 likes · 4 min read
Why JSON.parse(JSON.stringify) Fails for Deep Cloning and What to Use Instead
JavaScript
JavaScript
Apr 20, 2025 · Frontend Development

Replace Nested Loops with Elegant JavaScript Array Methods

This article explains how to replace verbose nested for‑loops in JavaScript with functional array methods like flat, map, filter, flatMap, and reduce, improving code readability, maintainability, and often performance for handling multi‑dimensional arrays.

FlatFunctional ProgrammingJavaScript
0 likes · 4 min read
Replace Nested Loops with Elegant JavaScript Array Methods
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Apr 20, 2025 · Frontend Development

Vue 2.0 vs Vue 3.0: Core Differences, Reactive System, Composition API, Lifecycle Hooks and Practical Code Examples

This article provides a comprehensive comparison between Vue 2 and Vue 3, covering changes in reactivity implementation, the introduction of the Composition API, lifecycle hook updates, component caching, data binding techniques, state‑management alternatives, storage options, and numerous code snippets that illustrate each concept for developers preparing for interviews or upgrading projects.

Composition APIJavaScriptVue2
0 likes · 25 min read
Vue 2.0 vs Vue 3.0: Core Differences, Reactive System, Composition API, Lifecycle Hooks and Practical Code Examples
Full-Stack Cultivation Path
Full-Stack Cultivation Path
Apr 18, 2025 · Fundamentals

Introducing Promise.try(): A Super‑Useful ES2025 API for Cleaner Async Code

Promise.try(), added in ES2025, is a static method that wraps any function—sync or async—into a Promise, automatically captures synchronous errors, and provides a unified, concise API for handling both synchronous and asynchronous operations, as demonstrated through multiple code examples and practical scenarios.

Async ProgrammingES2025JavaScript
0 likes · 7 min read
Introducing Promise.try(): A Super‑Useful ES2025 API for Cleaner Async Code
JavaScript
JavaScript
Apr 17, 2025 · Frontend Development

Why JavaScript’s New Temporal API Beats the Old Date Object

The article explains the long‑standing pain points of JavaScript’s Date object, introduces the modern, immutable Temporal API with its intuitive design, showcases core features and components, provides practical code examples, compares both APIs, and notes current browser support and polyfill options.

JavaScriptTemporal APIWeb Development
0 likes · 6 min read
Why JavaScript’s New Temporal API Beats the Old Date Object
JavaScript
JavaScript
Apr 16, 2025 · Frontend Development

Master Deep Copy in JavaScript with the Native structuredClone() Method

This article explains the challenges of deep copying in JavaScript, compares traditional methods like JSON.parse(JSON.stringify) and custom recursion, and introduces the modern native structuredClone() function, detailing its usage, supported data types, advantages, and current limitations across browsers and Node.js.

JavaScriptdeep copystructuredClone
0 likes · 5 min read
Master Deep Copy in JavaScript with the Native structuredClone() Method
Java Backend Full-Stack
Java Backend Full-Stack
Apr 15, 2025 · Backend Development

How to Retrieve Nearby Charging Station Information Using Redis GEO

This tutorial shows how to obtain a user's current latitude and longitude via an IP API, send the coordinates to a backend service that stores charging stations in Redis GEO, and query stations within a 20‑kilometer radius, with complete front‑end and back‑end code examples.

Charging StationGEOJava
0 likes · 4 min read
How to Retrieve Nearby Charging Station Information Using Redis GEO
JavaScript
JavaScript
Apr 15, 2025 · Frontend Development

Why Set Beats Traditional Array Deduplication in JavaScript

This article explains how using ES6 Set for array deduplication in JavaScript yields dramatically shorter code and up to 300× faster performance compared to traditional indexOf or filter methods, backed by benchmark results and best‑practice patterns combining Set with Array methods.

Array DeduplicationJavaScriptPerformance
0 likes · 6 min read
Why Set Beats Traditional Array Deduplication in JavaScript
JavaScript
JavaScript
Apr 14, 2025 · Frontend Development

7 Better Alternatives to setTimeout for Reliable JavaScript Timing

While setTimeout is a common JavaScript timer, its limited precision and throttling in inactive tabs can cause issues; this article presents seven more reliable alternatives—including requestAnimationFrame, setInterval, requestIdleCallback, Web Workers, Promise/async‑await, Web Animations API, and Intersection Observer—each with key advantages and usage examples.

JavaScriptTimerssetTimeout
0 likes · 5 min read
7 Better Alternatives to setTimeout for Reliable JavaScript Timing
macrozheng
macrozheng
Apr 13, 2025 · Fundamentals

Master Breakpoint Debugging: From IDEs to Browser Console

This guide explains what breakpoint debugging is, how to set breakpoints in popular IDEs and command‑line tools, start a debugging session, perform single‑step actions, and use browser developer tools for JavaScript, providing essential skills for any developer.

IDEJavaScriptbreakpoint
0 likes · 5 min read
Master Breakpoint Debugging: From IDEs to Browser Console
JavaScript
JavaScript
Apr 12, 2025 · Frontend Development

20 Powerful JavaScript One‑Liners to Boost Your Coding Efficiency

Discover 20 concise JavaScript one‑line tricks—from array deduplication and variable swapping to debouncing and date calculations—that streamline common tasks, boost performance, and make your code more elegant, all explained with clear examples and brief explanations.

JavaScriptOne-linerscode snippets
0 likes · 7 min read
20 Powerful JavaScript One‑Liners to Boost Your Coding Efficiency
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.

JavaScriptOptimizationPromise
0 likes · 5 min read
Boost JavaScript Async Performance by Up to 80% with New Patterns
Sohu Tech Products
Sohu Tech Products
Apr 9, 2025 · Frontend Development

React Compound Components Pattern: A Complete Guide

The article introduces the React Compound Components pattern, showing how a parent component with shared Context can expose reusable child parts—like Title, FormInputs, and SubmitButtons—so the same logic can be flexibly arranged in different layouts such as full‑page or modal, improving reuse, readability, and maintainability.

Component Design PatternCompound ComponentsJavaScript
0 likes · 11 min read
React Compound Components Pattern: A Complete Guide
Java Captain
Java Captain
Apr 9, 2025 · Backend Development

Server‑Sent Events (SSE) vs WebSocket vs Polling: Usage Scenarios, Advantages, and Implementation Demo

This article explains the three common server‑to‑client push techniques—polling, WebSocket, and SSE—detailing their principles, pros and cons, browser compatibility, and provides step‑by‑step Node.js/Express and plain JavaScript demos to illustrate how to implement SSE in real‑time applications.

ExpressJavaScriptNode.js
0 likes · 13 min read
Server‑Sent Events (SSE) vs WebSocket vs Polling: Usage Scenarios, Advantages, and Implementation Demo
JavaScript
JavaScript
Apr 9, 2025 · Frontend Development

Why Top Tech Companies Ban == and Enforce === in JavaScript

Large tech firms now prohibit the double‑equals operator in JavaScript, favoring triple‑equals to avoid type‑coercion bugs, improve readability, enhance security, and gain slight performance benefits, while static analysis tools enforce this best practice across codebases.

JavaScriptStrict Equalitycode quality
0 likes · 4 min read
Why Top Tech Companies Ban == and Enforce === in JavaScript
Top Architecture Tech Stack
Top Architecture Tech Stack
Apr 8, 2025 · Backend Development

Understanding Server‑Sent Events (SSE): Concepts, Comparison with Polling and WebSocket, and Implementation Demo

This article explains the principles and use cases of Server‑Sent Events (SSE), compares it with traditional polling and WebSocket solutions, outlines their advantages and drawbacks, and provides complete front‑end and Node.js/Express demo code to build a real‑time push system.

ExpressJavaScriptNode.js
0 likes · 13 min read
Understanding Server‑Sent Events (SSE): Concepts, Comparison with Polling and WebSocket, and Implementation Demo
JavaScript
JavaScript
Apr 8, 2025 · Frontend Development

10 Common JavaScript Destructuring Pitfalls and How to Avoid Them

This article outlines ten frequent JavaScript destructuring mistakes—such as unpacking undefined objects, confusing renaming syntax, overly nested patterns, array gaps, default value clashes, accidental literal targets, rest element ordering, return value misconceptions, name conflicts, and performance hits—and provides clear strategies to prevent each issue.

DestructuringJavaScriptcode pitfalls
0 likes · 6 min read
10 Common JavaScript Destructuring Pitfalls and How to Avoid Them
JavaScript
JavaScript
Apr 7, 2025 · Backend Development

Simplify JavaScript Resource Management with the New ‘using’ Declaration

This article explains how the upcoming JavaScript ‘using’ declaration, inspired by C# and Python, can replace verbose try…finally patterns for both synchronous and asynchronous resources, offering cleaner syntax, automatic disposal, and practical examples across files, databases, and mutexes.

JavaScriptTC39async disposal
0 likes · 5 min read
Simplify JavaScript Resource Management with the New ‘using’ Declaration
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.

Async/AwaitJavaScriptPromise
0 likes · 9 min read
Error Handling Strategies for async/await in JavaScript
21CTO
21CTO
Apr 4, 2025 · Frontend Development

What the Vue.js 2025 Report Says About the Framework’s Future

The Vue.js 2025 State Report highlights the framework’s growing maturity, adoption statistics versus React, upcoming Vapor mode delays, migration challenges, and future directions such as VoidZero, TypeScript usage, and the evolving JavaScript runtime landscape, offering developers a comprehensive view of Vue’s roadmap.

JavaScriptTypeScriptVapor Mode
0 likes · 6 min read
What the Vue.js 2025 Report Says About the Framework’s Future
JavaScript
JavaScript
Apr 3, 2025 · Frontend Development

Why IIFEs Are Obsolete: Embrace Modern ES Modules in JavaScript

This article reviews the historic use of Immediately Invoked Function Expressions (IIFEs) in JavaScript, explains their drawbacks, and demonstrates how native ES modules provide a cleaner, more maintainable, and standards‑based alternative for organizing code in modern front‑end development.

ES ModulesIIFEJavaScript
0 likes · 5 min read
Why IIFEs Are Obsolete: Embrace Modern ES Modules in JavaScript
JavaScript
JavaScript
Apr 2, 2025 · Frontend Development

Why Big Tech Bans JavaScript Short‑Circuit Operators and Safer Alternatives

Large tech companies often forbid JavaScript short‑circuit operators like && and || because they can harm readability, cause unexpected type coercion, complicate maintenance and debugging, so developers should prefer optional chaining, nullish coalescing, explicit conditionals, or clear if statements for safer, more maintainable code.

JavaScriptShort-Circuitcode quality
0 likes · 3 min read
Why Big Tech Bans JavaScript Short‑Circuit Operators and Safer Alternatives
JavaScript
JavaScript
Mar 30, 2025 · Frontend Development

Master Precise JavaScript Type Checking Without typeof

This article reveals a superior, typeof‑free JavaScript type‑checking technique using Object.prototype.toString, explains its advantages, edge cases, performance considerations, and demonstrates practical implementations for robust type validation, including handling of primitive wrappers, custom classes, and integration into validation libraries.

JavaScriptObject.prototype.toStringType Checking
0 likes · 6 min read
Master Precise JavaScript Type Checking Without typeof
JavaScript
JavaScript
Mar 29, 2025 · Frontend Development

Unlock Faster Frontend Performance with Web Workers: The Hidden Power

This article explains how Web Workers can dramatically improve frontend performance by offloading heavy computations from the main thread, detailing their benefits, common misconceptions, practical use cases like data processing and image filtering, and providing a concrete code example for real‑world implementation.

JavaScriptPerformance Optimizationfrontend
0 likes · 5 min read
Unlock Faster Frontend Performance with Web Workers: The Hidden Power
JavaScript
JavaScript
Mar 26, 2025 · Frontend Development

Why Vue3’s Composition API Beats Mixins: Benefits, Code & Migration Guide

Vue3’s Composition API replaces mixins with explicit, reusable functions, eliminating naming conflicts, hidden dependencies, and improving TypeScript support, as illustrated by a fintech trading platform migration case study. The article also compares the golden age of mixins, outlines their pitfalls, and provides code examples for a smooth transition.

Composition APIJavaScriptTypeScript
0 likes · 6 min read
Why Vue3’s Composition API Beats Mixins: Benefits, Code & Migration Guide
Tencent Technical Engineering
Tencent Technical Engineering
Mar 24, 2025 · Fundamentals

Understanding V8 Garbage Collection: Scavenger and Mark‑and‑Sweep Algorithms

V8’s garbage collector splits memory into young and old generations, using a fast Scavenger minor‑GC that marks live objects, evacuates them via semi‑space copying, and updates pointers with write barriers, while a concurrent mark‑and‑sweep major‑GC employs three‑color marking, black allocation, sweeping and optional parallel compaction, with adaptive triggering based on heap usage.

Garbage CollectionJavaScriptMark-and-Sweep
0 likes · 30 min read
Understanding V8 Garbage Collection: Scavenger and Mark‑and‑Sweep Algorithms
JavaScript
JavaScript
Mar 24, 2025 · Frontend Development

Why Callbacks Are Fading: From Callback Hell to Async/Await

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/AwaitAsynchronousJavaScript
0 likes · 6 min read
Why Callbacks Are Fading: From Callback Hell to Async/Await
Tencent Docs Tech Team
Tencent Docs Tech Team
Mar 24, 2025 · Fundamentals

How V8’s Scavenger and Mark‑Sweep Algorithms Optimize JavaScript Memory Management

This article explains V8’s generational heap layout, the Scavenger minor‑GC algorithm with its marking, evacuation and pointer‑updating steps, the parallel Scavenger enhancements, the major mark‑and‑sweep collector with optional compaction, and the various triggers that decide when each garbage‑collection phase runs.

Garbage CollectionJavaScriptMark‑Sweep
0 likes · 30 min read
How V8’s Scavenger and Mark‑Sweep Algorithms Optimize JavaScript Memory Management
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Mar 24, 2025 · Artificial Intelligence

AI SDK 4.2 Release: New Reasoning, MCP Client, useChat Message Components, Image Generation, URL Sources, and Provider Updates

The AI SDK 4.2 release introduces powerful new features such as step‑by‑step reasoning support, a Model Context Protocol (MCP) client for tool integration, useChat message components, multimodal image generation, standardized URL sources, OpenAI Responses API support, Svelte 5 compatibility, and numerous middleware and provider enhancements, all illustrated with practical JavaScript/TypeScript examples.

AI SDKJavaScriptMCP
0 likes · 19 min read
AI SDK 4.2 Release: New Reasoning, MCP Client, useChat Message Components, Image Generation, URL Sources, and Provider Updates
JavaScript
JavaScript
Mar 22, 2025 · Frontend Development

10 One‑Line JavaScript Tricks to Simplify Everyday Coding

This article presents ten concise, one‑line JavaScript techniques—from array deduplication and object merging to random value generation and deep copying—that streamline common development tasks, improve code readability, and boost efficiency for front‑end developers.

JavaScriptOne-linercode snippets
0 likes · 4 min read
10 One‑Line JavaScript Tricks to Simplify Everyday Coding
JavaScript
JavaScript
Mar 21, 2025 · Frontend Development

Master JavaScript Strict Mode: Benefits, Common Pitfalls, and How to Use It

This guide explains JavaScript’s Strict Mode—how to enable it with "use strict", why it improves code safety and engine optimization, and highlights common traps such as undeclared variables, deleting identifiers, duplicate parameters, octal literals, with statements, and incorrect this binding, offering correct practices for each.

CodingJavaScriptfrontend
0 likes · 4 min read
Master JavaScript Strict Mode: Benefits, Common Pitfalls, and How to Use It
ByteDance Web Infra
ByteDance Web Infra
Mar 21, 2025 · Artificial Intelligence

Midscene.js: An AI‑Driven UI Automation Framework from ByteDance

Midscene.js is an open‑source UI automation framework that leverages multimodal AI to simplify web UI testing and interaction, offering three core interfaces—Action, Query, and Assert—along with a JavaScript SDK, support for multiple AI models, YAML scripting, and future‑focused features for stable, scalable automation.

AIJavaScriptMidscene.js
0 likes · 21 min read
Midscene.js: An AI‑Driven UI Automation Framework from ByteDance
JD Cloud Developers
JD Cloud Developers
Mar 20, 2025 · Frontend Development

Why Does Your Browser Crash? Uncover V8’s Memory Management Secrets

This article explains how V8’s memory management and garbage‑collection mechanisms work, outlines common memory‑leak scenarios in JavaScript, and provides practical techniques and tools for detecting and optimizing memory usage to prevent browser crashes and improve performance.

Garbage CollectionJavaScriptMemory Management
0 likes · 18 min read
Why Does Your Browser Crash? Uncover V8’s Memory Management Secrets
Sohu Tech Products
Sohu Tech Products
Mar 19, 2025 · Frontend Development

Why TypeScript Is Not Enough and How Zod Complements It

While TypeScript guarantees compile-time type safety, it cannot validate runtime data such as API responses or form inputs, so developers add extra checks; Zod solves this by offering a TypeScript-first schema library that performs runtime validation, infers types, reduces duplication, and integrates seamlessly with modern frameworks.

Front-endJavaScriptTypeScript
0 likes · 13 min read
Why TypeScript Is Not Enough and How Zod Complements It
Code Mala Tang
Code Mala Tang
Mar 18, 2025 · Frontend Development

Why Importing Whole Libraries Bloats Your Bundle and How Wrapper Patterns Can Help

This article explains how importing entire libraries like lodash and Framer Motion can dramatically increase bundle size, demonstrates precise import techniques, introduces a wrapper pattern for better maintainability, and offers practical tips for choosing tree‑shakable libraries and tracking import sizes.

JavaScriptbundle optimizationfrontend
0 likes · 6 min read
Why Importing Whole Libraries Bloats Your Bundle and How Wrapper Patterns Can Help
JavaScript
JavaScript
Mar 17, 2025 · Frontend Development

10 Powerful JavaScript String Tricks to Boost Code Readability

This article presents ten practical JavaScript string handling techniques—from template literals and destructuring to modern methods like includes, startsWith, padStart, optional chaining, and string interpolation—each illustrated with concise code examples to improve readability, reduce boilerplate, and enhance maintainability.

DestructuringJavaScriptString Methods
0 likes · 4 min read
10 Powerful JavaScript String Tricks to Boost Code Readability
21CTO
21CTO
Mar 16, 2025 · Frontend Development

Why Chasing New JavaScript Frameworks Wastes Your Time—and What Really Matters

The article argues that constantly jumping to the latest JavaScript frameworks drains productivity, offers a recurring hype‑cycle analysis, compares popular frameworks, and recommends focusing on core programming skills and stable, widely‑adopted tools for lasting career growth.

FrameworksJavaScriptcareer advice
0 likes · 8 min read
Why Chasing New JavaScript Frameworks Wastes Your Time—and What Really Matters
JavaScript
JavaScript
Mar 16, 2025 · Frontend Development

Master JavaScript Closures: 10 Must‑Know Interview Questions & Answers

This comprehensive guide explains JavaScript closures, covering their definition, memory‑leak risks, loop pitfalls, private variables, this binding, module pattern, static scope, performance impact, and currying, each with clear answers and practical code examples for front‑end interview preparation.

InterviewJavaScriptclosure
0 likes · 17 min read
Master JavaScript Closures: 10 Must‑Know Interview Questions & Answers
JavaScript
JavaScript
Mar 15, 2025 · Frontend Development

Master High-Performance Infinite Scroll with Just 7 Lines of JavaScript

Learn how to replace traditional, resource‑heavy infinite scroll implementations with a concise seven‑line JavaScript solution that leverages IntersectionObserver, DOM recycling, state locking, and lazy image loading, delivering dramatically lower CPU and memory usage while boosting frame rates to smooth 60 fps experiences.

IntersectionObserverJavaScriptPerformance Optimization
0 likes · 6 min read
Master High-Performance Infinite Scroll with Just 7 Lines of JavaScript
JavaScript
JavaScript
Mar 14, 2025 · Frontend Development

Why Array.forEach Is Slower Than Classic Loops and When to Use It

This article explains why the JavaScript Array.forEach method is often slower than traditional for or for...of loops, outlines its performance drawbacks, compares it with other iteration techniques, and shows when its simplicity might still make it a suitable choice.

JavaScriptLoopsPerformance
0 likes · 5 min read
Why Array.forEach Is Slower Than Classic Loops and When to Use It
Sohu Tech Products
Sohu Tech Products
Mar 12, 2025 · Backend Development

Experimental TypeScript Execution in Node.js 23

Node.js 23’s experimental --experimental-strip-types flag lets developers run TypeScript files directly by stripping type annotations at runtime, eliminating a separate compilation step, but it performs no type checking, so tsc should still be used for safety, making it useful for rapid prototyping while remaining experimental.

JavaScriptNode.jsTypeScript
0 likes · 7 min read
Experimental TypeScript Execution in Node.js 23
JavaScript
JavaScript
Mar 10, 2025 · Frontend Development

7 Powerful Alternatives to the Ternary Operator for Cleaner JavaScript

This guide presents seven practical techniques—including logical short‑circuiting, object mapping, destructuring defaults, array methods, optional chaining, early returns, and functional programming—to replace ternary operators and simplify JavaScript conditional logic, resulting in cleaner, more readable, and maintainable code.

Conditional LogicJavaScriptcode optimization
0 likes · 3 min read
7 Powerful Alternatives to the Ternary Operator for Cleaner JavaScript
JavaScript
JavaScript
Mar 9, 2025 · Frontend Development

Why Top Tech Companies Ban == in JavaScript: The Case for ===

Major tech firms such as Google, Airbnb, and Microsoft forbid the use of JavaScript’s == operator and advocate === because it avoids unpredictable type coercion, improves code readability and maintainability, offers better performance, reduces bugs, and enhances security, especially in critical applications.

JavaScriptType Coercionbest practices
0 likes · 3 min read
Why Top Tech Companies Ban == in JavaScript: The Case for ===
JavaScript
JavaScript
Mar 8, 2025 · Frontend Development

Mastering JavaScript’s Nullish Coalescing (??) Operator: When to Use It Over ||

Learn how JavaScript’s nullish coalescing (??) operator works, its key differences from the logical OR (||) operator, and see practical examples—from handling default form values to chaining defaults and combining with optional chaining—plus performance considerations and advanced patterns.

?? operatorDefault ValuesJavaScript
0 likes · 6 min read
Mastering JavaScript’s Nullish Coalescing (??) Operator: When to Use It Over ||
php Courses
php Courses
Mar 7, 2025 · Backend Development

How to Implement Taxi Trajectory Visualization with PHP and Baidu Maps API

This tutorial demonstrates step-by-step how to set up a MySQL database, create PHP scripts to retrieve taxi trajectory data, and use Baidu Maps JavaScript API within an HTML page to render dynamic taxi movement paths, including complete code examples for each stage.

Baidu MapsJavaScriptPHP
0 likes · 6 min read
How to Implement Taxi Trajectory Visualization with PHP and Baidu Maps API
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.

JavaScriptPromisePromise.allSettled
0 likes · 3 min read
Why Promise.allSettled Beats Promise.all for Robust Async JavaScript
Sohu Tech Products
Sohu Tech Products
Mar 5, 2025 · Frontend Development

Why Modern JavaScript Developers Move Away from Traditional Loops and What to Use Instead

Modern JavaScript developers increasingly replace traditional for‑loops with expressive array methods, generators, and functional patterns because loops risk scope leakage, mutable state, and off‑by‑one errors, while still using classic loops only for performance‑critical or low‑level tasks, choosing the style that fits data size, team preferences, and project requirements.

Functional ProgrammingJavaScriptLoops
0 likes · 8 min read
Why Modern JavaScript Developers Move Away from Traditional Loops and What to Use Instead
JavaScript
JavaScript
Mar 4, 2025 · Frontend Development

Simplify CORS in Frontend: One‑Line Fetch API Fix & New Import Assertions

This article explains the fundamentals of CORS, reviews traditional mitigation methods, and demonstrates how modern Fetch API options, import assertions, and emerging web standards provide concise, secure ways to handle cross‑origin requests in frontend development.

CORSFetch APIJavaScript
0 likes · 5 min read
Simplify CORS in Frontend: One‑Line Fetch API Fix & New Import Assertions
Tencent Technical Engineering
Tencent Technical Engineering
Mar 3, 2025 · Frontend Development

2024 Front-End Technology Review and Outlook for 2025

The 2024 front‑end review highlights Python eclipsing JavaScript on GitHub, TypeScript’s steady rise, ECMAScript 2024 utilities, major framework releases (React 19, Vue 3.5, Svelte 5, Angular 19), a surge of Rust‑based tooling, new JavaScript runtimes, Chrome’s anchor CSS, AI‑driven development tools, cross‑platform advances, WebAssembly’s component model, and forecasts 2025’s AI‑enhanced productivity, deeper TypeScript adoption, Rust tooling dominance, and unified multi‑device strategies.

FrameworksFront-endJavaScript
0 likes · 76 min read
2024 Front-End Technology Review and Outlook for 2025
Java Architecture Diary
Java Architecture Diary
Mar 3, 2025 · Frontend Development

Boost Real-Time AI Streams in the Browser with fetch-event-source

This article explains how Server‑Sent Events (SSE) work, outlines the limitations of the native EventSource API, and demonstrates how the fetch‑event‑source library enhances SSE with POST support, custom headers, retry strategies, and visibility handling, enabling efficient real‑time AI data streams in modern web front‑ends.

AIJavaScriptSSE
0 likes · 6 min read
Boost Real-Time AI Streams in the Browser with fetch-event-source
JavaScript
JavaScript
Mar 2, 2025 · Frontend Development

Why ‘var’ Is Dangerous and How let/const Solve Its Pitfalls

This article examines why the traditional JavaScript var keyword should be avoided, explains the subtle pitfalls of its function scope, hoisting, and global leakage, and highlights the essential, often overlooked features of let and const—including temporal dead zone, true block scope, and immutability nuances.

JavaScriptScopeconst
0 likes · 8 min read
Why ‘var’ Is Dangerous and How let/const Solve Its Pitfalls
JavaScript
JavaScript
Feb 28, 2025 · Frontend Development

Why forEach Is Slower: Faster JavaScript Loop Alternatives You Should Use

While forEach is popular for its readability, it suffers from slower performance, inability to break early, lack of async support, and always returns undefined; this article examines its limitations and presents faster alternatives such as classic for loops, for…of, and functional methods like map, filter, reduce, some, and every.

JavaScriptarray methods
0 likes · 3 min read
Why forEach Is Slower: Faster JavaScript Loop Alternatives You Should Use
Sohu Tech Products
Sohu Tech Products
Feb 26, 2025 · Frontend Development

Detecting and Optimizing Repeated Rendering in Large React Applications with React Scan

The article explains how repeated rendering slows large React applications, introduces the React Scan tool for automatically detecting unnecessary renders, details its installation via script tag or npm, describes its core APIs, and shows how to combine it with memoization, useCallback, useMemo, and other optimization techniques to improve performance.

JavaScriptReActReact Scan
0 likes · 14 min read
Detecting and Optimizing Repeated Rendering in Large React Applications with React Scan
Sohu Tech Products
Sohu Tech Products
Feb 26, 2025 · Frontend Development

Automatically Adding Optional Chaining Operator via Babel Plugin to Prevent TypeError

An automatically applied Babel plugin scans JavaScript AST nodes and rewrites risky property accesses and logical‑AND chains into optional‑chaining expressions, letting developers prevent TypeError crashes without modifying source code, while offering include/exclude filters, optional short‑circuit optimization, and compatibility with older browsers via downstream transforms.

AST transformationBabelJavaScript
0 likes · 11 min read
Automatically Adding Optional Chaining Operator via Babel Plugin to Prevent TypeError
JavaScript
JavaScript
Feb 26, 2025 · Frontend Development

Master JavaScript Array Methods: From map to flatMap

This guide explains how JavaScript’s built‑in array methods—such as map, filter, reduce, forEach, find, some, every, includes, flat, flatMap, findIndex, and slice—can replace nested loops, improve readability, and enable powerful method chaining for concise, efficient data manipulation.

JavaScriptarray methodsfilter
0 likes · 7 min read
Master JavaScript Array Methods: From map to flatMap
JavaScript
JavaScript
Feb 24, 2025 · Frontend Development

7 JavaScript Type Coercion Pitfalls You Must Avoid

This article explores seven common JavaScript type‑coercion pitfalls—including number‑string, boolean, null/undefined, object, array, multiple operand, and NaN comparisons—showing surprising results and providing code examples to help developers avoid subtle bugs in real‑world applications.

JavaScriptOperatorfrontend
0 likes · 4 min read
7 JavaScript Type Coercion Pitfalls You Must Avoid