Tag

array iteration

1 views collected around this technical thread.

政采云技术
政采云技术
May 25, 2021 · Frontend Development

A Comprehensive Guide to JavaScript Array and Object Iteration Methods

This article provides a comprehensive comparison of common JavaScript iteration methods for arrays and objects, including for, forEach, for...of, map, filter, reduce, and Object.keys, detailing their syntax, performance characteristics, termination behaviors, and practical use cases to help developers choose the most efficient approach.

ES6 FeaturesJavaScriptarray iteration
0 likes · 12 min read
A Comprehensive Guide to JavaScript Array and Object Iteration Methods
php中文网 Courses
php中文网 Courses
Apr 21, 2021 · Backend Development

Understanding PHP foreach by Simulating It with current(), reset() and next() Functions

This tutorial explains how to grasp the inner workings of PHP's foreach loop by using the current(), reset() and next() functions to manually iterate over arrays, providing syntax details, practical code examples, and the resulting output for clearer comprehension.

array iterationcurrentforEach
0 likes · 3 min read
Understanding PHP foreach by Simulating It with current(), reset() and next() Functions
php中文网 Courses
php中文网 Courses
Mar 19, 2021 · Backend Development

Understanding PHP foreach Loop Syntax and Usage

This tutorial explains PHP's foreach loop syntax, illustrating how to iterate over arrays with value-only and key‑value formats, and how to traverse object properties, accompanied by complete code examples for each case.

Backend Developmentarray iterationforEach
0 likes · 2 min read
Understanding PHP foreach Loop Syntax and Usage
Vipshop Quality Engineering
Vipshop Quality Engineering
Aug 8, 2017 · Frontend Development

Why for…in Breaks JavaScript Arrays and How for…of Fixes It

This article examines a production incident caused by using the ES5 for...in loop to iterate over arrays, explains its pitfalls such as prototype pollution and string indexes, and demonstrates why switching to the ES6 for...of construct provides safer, more predictable array traversal.

ES6JavaScriptPrototype
0 likes · 6 min read
Why for…in Breaks JavaScript Arrays and How for…of Fixes It