Tagged articles
38 articles
Page 1 of 1
Lisa Notes
Lisa Notes
Mar 23, 2026 · Fundamentals

Master Java Loop Statements: From Basics to Practical Examples

This article explains Java's loop constructs—including while, do‑while, for, nested loops, foreach, and bubble‑sort implementations—through detailed syntax descriptions, step‑by‑step execution processes, and multiple concrete code examples with expected outputs.

JavaLoop Statementsbubble sort
0 likes · 16 min read
Master Java Loop Statements: From Basics to Practical Examples
php Courses
php Courses
Dec 25, 2025 · Backend Development

Quick Ways to Print PHP 2D Arrays for Debugging

This guide explains five practical techniques—print_r, var_dump, json_encode, nested foreach loops, and var_export—to display or export two‑dimensional PHP arrays in browsers or CLI, including code examples, formatting tips, and handling of HTML special characters.

Debuggingforeachjson_encode
0 likes · 4 min read
Quick Ways to Print PHP 2D Arrays for Debugging
JavaScript
JavaScript
Nov 20, 2025 · Frontend Development

Why forEach Slows You Down: Faster JavaScript Loop Alternatives

This article examines the performance drawbacks and limitations of JavaScript's forEach method and presents faster alternatives such as classic for loops, for…of, functional methods like map, filter, reduce, and early‑exit methods like some and every.

JavaScriptLoopsarray methods
0 likes · 3 min read
Why forEach Slows You Down: Faster JavaScript Loop Alternatives
JavaScript
JavaScript
Oct 31, 2025 · Frontend Development

Why forEach Is Losing Favor: Switch to for...of for Safer Async Loops

The article explains why Array.prototype.forEach is increasingly discouraged in modern JavaScript, especially when combined with async/await, and shows how replacing it with a for...of loop resolves asynchronous pitfalls, enables proper flow‑control statements, and improves code clarity.

/loopJavaScriptarray methods
0 likes · 5 min read
Why forEach Is Losing Favor: Switch to for...of for Safer Async Loops
php Courses
php Courses
Sep 19, 2025 · Backend Development

Master PHP Functions: Define, Pass, Loop, and Return Arrays

This guide explains how to define, pass, iterate over, and return arrays within PHP functions, covering array creation with array(), parameter passing, traversal using both for and foreach loops, and returning modified arrays, complete with full code examples for each step.

ArraysBackend DevelopmentCode Tutorial
0 likes · 5 min read
Master PHP Functions: Define, Pass, Loop, and Return Arrays
JavaScript
JavaScript
Sep 7, 2025 · Frontend Development

Why forEach Is Losing Favor: Switch to for...of for Async JavaScript Loops

The article explains why Array.prototype.forEach is increasingly discouraged in modern JavaScript, especially with async/await, and demonstrates how replacing it with a for...of loop resolves async handling, break/continue control, and improves code clarity.

JavaScriptasync/awaitfor...of
0 likes · 6 min read
Why forEach Is Losing Favor: Switch to for...of for Async JavaScript Loops
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
Architecture Digest
Architecture Digest
Mar 18, 2025 · Fundamentals

Understanding Java foreach Loop, HashMap Iteration, and ConcurrentModificationException

This article explains how Java's foreach loop is implemented using iterators, demonstrates the bytecode differences between array and collection traversal, analyzes why modifying a HashMap during foreach can trigger ConcurrentModificationException, and shows the correct way to safely modify collections with an iterator.

CollectionsConcurrentModificationExceptionHashMap
0 likes · 11 min read
Understanding Java foreach Loop, HashMap Iteration, and ConcurrentModificationException
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.

JavaScriptLoopsforeach
0 likes · 5 min read
Why Array.forEach Is Slower Than Classic Loops and When to Use It
JavaScript
JavaScript
Dec 25, 2024 · Frontend Development

7 Essential JavaScript Array Methods Every Developer Should Master

This guide explores seven powerful JavaScript array methods—map, filter, reduce, forEach, find, some, and every—detailing their syntax, practical examples, performance tips, and how to combine them for efficient data manipulation in modern web development.

JavaScriptMAParray methods
0 likes · 9 min read
7 Essential JavaScript Array Methods Every Developer Should Master
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Mar 29, 2024 · Frontend Development

Practical Frontend Techniques: Vite Auto Routing, await-to-js Source Walkthrough, URL Parameter Handling, Controlling forEach Loops, and Singleton Request Management

This article presents practical frontend solutions, including automatic route generation in Vite projects using unplugin-vue-router, a detailed source analysis of the await‑to‑js error‑handling wrapper, methods for extracting URL parameters, techniques to terminate or replace forEach loops, and patterns for avoiding duplicate component requests.

JavaScriptSingletonforeach
0 likes · 17 min read
Practical Frontend Techniques: Vite Auto Routing, await-to-js Source Walkthrough, URL Parameter Handling, Controlling forEach Loops, and Singleton Request Management
IT Services Circle
IT Services Circle
Jan 10, 2024 · Backend Development

Why Using forEach to Remove Elements from an ArrayList Throws ConcurrentModificationException and How to Delete Safely

The article explains why iterating an ArrayList with forEach and removing elements causes a ConcurrentModificationException, analyzes the underlying fail‑fast iterator behavior, and presents three correct ways—using Iterator.remove, removeIf, and collecting then removing—to delete elements safely.

ArrayListConcurrentModificationExceptionIterator
0 likes · 4 min read
Why Using forEach to Remove Elements from an ArrayList Throws ConcurrentModificationException and How to Delete Safely
php Courses
php Courses
Oct 8, 2023 · Backend Development

Understanding the Power of & in PHP foreach Loops

This article explains how PHP's foreach loop works and demonstrates the powerful use of the & reference operator to modify array elements, create dynamic variables, handle large datasets efficiently, and outlines best practices and alternatives for safe and effective coding.

/loopPHPforeach
0 likes · 5 min read
Understanding the Power of & in PHP foreach Loops
Top Architect
Top Architect
Aug 24, 2023 · Backend Development

Understanding Java foreach Loop Limitations and Proper Element Deletion/Modification

This article explains how Java's foreach loop iterates over arrays and collections, demonstrates why removing or reassigning elements within a foreach causes ConcurrentModificationException or has no effect, and shows the correct ways to delete or modify elements using traditional for loops or iterator methods, complete with code examples.

BackendCollectionIterator
0 likes · 10 min read
Understanding Java foreach Loop Limitations and Proper Element Deletion/Modification
php Courses
php Courses
Jun 27, 2023 · Backend Development

Comprehensive Guide to PHP foreach Loop with Examples

This article thoroughly explains PHP's foreach loop syntax, demonstrates its use with indexed, associative, and multidimensional arrays, and provides complete code examples showing how to access values and keys in each scenario.

/loopArraysBackend
0 likes · 6 min read
Comprehensive Guide to PHP foreach Loop with Examples
Programmer DD
Programmer DD
May 9, 2022 · Fundamentals

Can You Remove Items Inside a Java foreach Loop? Why It Fails and How to Fix It

This article explores how Java's foreach loop handles collection traversal, demonstrates why removing or modifying elements directly within a foreach causes ConcurrentModificationException, compares it with traditional for loops, and shows the correct way to delete or update elements using an iterator or element properties.

/loopCollectionConcurrentModificationException
0 likes · 9 min read
Can You Remove Items Inside a Java foreach Loop? Why It Fails and How to Fix It
Programmer DD
Programmer DD
Oct 24, 2021 · Fundamentals

Why Adding or Removing Elements Inside a Java foreach Loop Fails

This article explains why modifying a collection during a Java foreach loop triggers a ConcurrentModificationException, explores the underlying fail‑fast mechanism in ArrayList, and demonstrates safe alternatives such as using an Iterator's remove method or a CopyOnWriteArrayList.

ArrayListConcurrentModificationExceptionIterator
0 likes · 9 min read
Why Adding or Removing Elements Inside a Java foreach Loop Fails
Java High-Performance Architecture
Java High-Performance Architecture
Aug 3, 2021 · Frontend Development

Which JavaScript Loop Wins? A Speed and Use‑Case Battle of for, forEach, map, for…in and for…of

This article compares five JavaScript iteration constructs—classic for, forEach, map, for...in and for...of—explaining their origins, semantics, performance characteristics, and appropriate use‑cases, while providing concrete code examples and guidance on breaking, continuing, and avoiding common pitfalls.

JavaScriptMAPfor loop
0 likes · 12 min read
Which JavaScript Loop Wins? A Speed and Use‑Case Battle of for, forEach, map, for…in and for…of
Selected Java Interview Questions
Selected Java Interview Questions
Jun 4, 2021 · Fundamentals

Why Removing Elements During forEach on an ArrayList Triggers ConcurrentModificationException and How to Fix It

The article explains that deleting elements from an ArrayList inside a forEach loop can cause a ConcurrentModificationException because the iterator's expected modification count diverges from the actual count, and it shows correct ways to remove items safely using an explicit Iterator or a CopyOnWriteArrayList.

ArrayListConcurrentModificationExceptionCopyOnWriteArrayList
0 likes · 5 min read
Why Removing Elements During forEach on an ArrayList Triggers ConcurrentModificationException and How to Fix It
php Courses
php Courses
Mar 23, 2021 · Backend Development

Removing Empty Elements from a PHP Array Using foreach and array_filter

This article explains two PHP techniques for removing empty or falsy elements from an array: a straightforward foreach loop that unsets unwanted values and the more efficient array_filter() function with optional callbacks and flags, including code examples and the resulting output.

BackendPHPTutorial
0 likes · 3 min read
Removing Empty Elements from a PHP Array Using foreach and array_filter
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
KooFE Frontend Team
KooFE Frontend Team
Feb 9, 2021 · Frontend Development

Which JavaScript Loop Is Fastest? Benchmark Results and Best Use Cases

This article compares the performance of common JavaScript looping constructs—including for, reverse for, forEach, for...of, for...in, and for...await—provides benchmark code on a million‑element array, explains the speed differences, and offers guidance on choosing the right loop for readability and maintainability.

BenchmarkJavaScriptLoops
0 likes · 7 min read
Which JavaScript Loop Is Fastest? Benchmark Results and Best Use Cases
Node Underground
Node Underground
Oct 12, 2018 · Frontend Development

Why map and filter Beat forEach in JavaScript: Cleaner, Testable Code

Using map and filter instead of forEach when creating new arrays in JavaScript offers semantic separation, easier testing, better readability, and async compatibility, making code more functional and maintainable while avoiding side‑effects and unnecessary complexity.

MAParray methodsfilter
0 likes · 6 min read
Why map and filter Beat forEach in JavaScript: Cleaner, Testable Code
Java Captain
Java Captain
Aug 19, 2018 · Fundamentals

Performance Comparison of Java forEach, C‑Style Loop, and Stream API

This article examines Java's forEach syntax, C‑style for loops, and Stream API by benchmarking their execution times on large collections, explaining the underlying mechanisms that cause performance differences and identifying the most efficient traversal method for Sets.

/loopBenchmarkingStream
0 likes · 7 min read
Performance Comparison of Java forEach, C‑Style Loop, and Stream API
Beike Product & Technology
Beike Product & Technology
Jul 9, 2017 · Backend Development

Analyzing PHP foreach Memory Behavior and Array Internals

This article examines how PHP's foreach construct consumes memory under different reference modes, explains the internal structure of PHP arrays, buckets, and zvals, and provides practical recommendations for choosing reference or value iteration to minimize memory usage.

Arraybackend-developmentforeach
0 likes · 17 min read
Analyzing PHP foreach Memory Behavior and Array Internals
Aotu Lab
Aotu Lab
Apr 29, 2016 · Frontend Development

Mastering JavaScript’s reduce(): From Basics to Advanced Use Cases

This article explains the ES5 Array.prototype.reduce() method, compares it with forEach and map, details its syntax and parameters, provides step‑by‑step code examples—including handling of initial values and object arrays—and notes browser compatibility and library alternatives.

ArrayJavaScriptMAP
0 likes · 7 min read
Mastering JavaScript’s reduce(): From Basics to Advanced Use Cases