Tagged articles
Destructuring
18 articles · Page 1 of 1
A practical cheat sheet grouping the 20+ most-used ES6+ features by daily coding scenarios — scope declarations, template strings, destructuring, arrow functions, spread operator, optional chaining, nullish coalescing, Map/Set, modern array methods, and dynamic imports — with code examples, common pitfalls, and decision guidelines.
Array MethodsArrow FunctionsDestructuring
0 likes · 12 min read

This article explains why the destructuring statement var [a, b] = {a:1, b:2} throws a TypeError, explores the iterator protocol and Symbol.iterator, and shows how redefining Object.prototype[Symbol.iterator] enables the object to be iterable so the destructuring succeeds.
DestructuringIterator ProtocolJavaScript
0 likes · 6 min read
![How to Make var [a, b] = {a:1, b:2} Work in JavaScript?](https://wsrv.nl/?url=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FFCeL9x2FWkfLlUbiccJdtd1tIuodHiaa62oJGPl8N8sicEjOuicfMdUszolDtPFuN4H43U0YLh0Z8SQvEx0t9h7JpsiaYWbqbApdKfytRRYqqUOk%2F0%3Fwx_fmt%3Djpeg)
The article explains why the destructuring statement var [a, b] = {a: 1, b: 2} throws a TypeError, details the iterator requirement for the left‑hand side, and shows how to add a Symbol.iterator method to Object.prototype so any object becomes iterable and the assignment succeeds.
DestructuringIterator ProtocolJavaScript
0 likes · 6 min read
![How to Make var [a, b] = {a: 1, b: 2} Work in JavaScript?](https://wsrv.nl/?url=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FFCeL9x2FWkfLlUbiccJdtd1tIuodHiaa62oJGPl8N8sicEjOuicfMdUszolDtPFuN4H43U0YLh0Z8SQvEx0t9h7JpsiaYWbqbApdKfytRRYqqUOk%2F0%3Fwx_fmt%3Djpeg)

21CTOApr 2, 2026 · Fundamentals
Kotlin 2.3.20, released on March 16, introduces name‑based destructuring, improved C/Objective‑C interop for Kotlin Native, Kotlin/JS interface support, Maven and Gradle enhancements, new compiler annotations, and experimental features like a Lombok plugin and Map.Entry.copy() for safer collections.
DestructuringGradleInterop
0 likes · 5 min read

This guide explains several practical techniques for returning multiple values from a PHP function, including indexed and associative arrays, reference parameters, object or anonymous class returns, and PHP 7.1+ destructuring assignment, with clear code examples for each method.
DestructuringFunctionObject
0 likes · 4 min read

This article reveals five powerful yet often hidden JavaScript features—including advanced destructuring, nullish coalescing, optional chaining, modern array/object methods, template literal tricks, and functional programming patterns—showing how they can dramatically shrink code, boost readability, and accelerate development efficiency.
DestructuringTemplate literalscode-optimization
0 likes · 6 min read

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

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.
DestructuringES6JavaScript
0 likes · 6 min read

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.
Code ExamplesDestructuringJavaScript
0 likes · 4 min read

Learn how to define, initialize, access, destructure, and apply Rust tuples—including function returns, pattern matching, and limitations—through clear explanations and code examples that illustrate their flexibility and best-use scenarios for safer, more efficient Rust programming.
DestructuringRustpattern matching
0 likes · 5 min read

This article shares practical JavaScript snippets for managing dictionaries with Map, deduplicating arrays using Set, constructing data with Array.from, applying destructuring patterns, merging API modules in Vue projects, and converting flat data into tree structures, providing clear examples and reusable code.
Array.fromDestructuringJavaScript
0 likes · 7 min read

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

This article demonstrates how to modernize and simplify JavaScript code by applying ES6 techniques such as object destructuring, Set‑based array deduplication, includes() for condition checks, optional chaining for safe property access, and array flattening methods, improving readability and maintainability.
Array MethodsDestructuringES6
0 likes · 8 min read


ByteFEAug 10, 2021 · Frontend Development
This article examines whether JavaScript destructuring assignment saves memory or runs faster than the traditional temporary‑variable swap by analyzing the creation of a temporary array, benchmarking loop performance, and discussing observed inconsistencies that may stem from JIT optimizations.
DestructuringJavaScriptspace efficiency
0 likes · 4 min read

This article offers a practical guide to the most commonly used ES6 features—let/const, arrow functions, template literals, destructuring, default parameters, spread operator, object literals, and classes—explaining their syntax, behavior, and real‑world usage to help developers quickly master modern JavaScript.
Arrow FunctionsDestructuringES6
0 likes · 12 min read

This article explains how ECMAScript 6 improves JavaScript function parameters with rest and spread operators, default values, and destructuring, showing syntax, practical examples, browser support, and best‑practice tips for writing clearer, more maintainable code.
Default ParametersDestructuringES6
0 likes · 14 min read

This article introduces four essential ES6 features—let/const variable declarations, template strings, the new Set and Map collections, and enhanced function parameters with defaults and object destructuring—providing clear code examples that demonstrate their advantages over ES5 syntax.
DestructuringES6JavaScript
0 likes · 5 min read

This article explains how ES6 improves JavaScript function parameters with rest parameters, spread syntax, default values, and destructuring, showing practical code examples, usage tips, and browser support details for both desktop and mobile environments.
Default ParametersDestructuringES6
0 likes · 15 min read
