Foreach loop
id:
foreach-loop-177-18397083
title:
Foreach loop
text:
In computer programming, foreach loop is a control flow statement for traversing items in a collection. foreach is usually used in place of a standard for loop statement. Unlike other for loop constructs, however, foreach loops usually maintain no explicit counter: they essentially say "do this to everything in this set", rather than "do this x times". This avoids potential off-by-one errors and makes code simpler to read. In object-oriented languages, an iterator, even if implicit, is often use
brand slug:
wiki
category slug:
encyclopedia
description:
Control flow statement for traversing items in a collection
original url:
https://en.wikipedia.org/wiki/Foreach_loop
date created:
2004-04-28T12:18:15Z
date modified:
2024-09-04T07:04:22Z
main entity:
{"identifier":"Q3273595","url":"https://www.wikidata.org/entity/Q3273595"}
image:
{"content_url":"https://upload.wikimedia.org/wikipedia/commons/1/13/For-Loop-Mint-Programming-Language-Type-2.gif","width":256,"height":256}
fields total:
13
integrity:
16