DIR Return Create A Forum - Home
---------------------------------------------------------
the car lovers forum
HTML https://carlovers.createaforum.com
---------------------------------------------------------
*****************************************************
DIR Return to: General Discussion
*****************************************************
#Post#: 16--------------------------------------------------
Used within a loop
DIR By: asim roy
Date: September 14, 2023, 5:42 am
---------------------------------------------------------
For example, simple arrays, strings, collections, collections,
etc. To learn more about collections, take this course Loops are
only used to enumerate the items of a collection. It cannot be
used to add, insert, delete, or update items of the collection
being enumerated. Both the and statements can be used with loops
to break out of the loop and skip statements within the loop
respectively. How does the loop work Programming Languages Top
Courses Unlike loops, loops do not require lower bounds,
increment statements, and upper bounds to determine how many
times it should execute.
The loop enumerates the collection starting from the first index
and continues until there are no more elements in the
collection. It is the framework's job to keep track of Phone
Number List
HTML https://b2bphonelist.com/
lower and upper bounds. This is why
loops are more efficient than simple loops. The following
example demonstrates how to use a loop to enumerate the items in
an array odds the in odds In the code snippet above, there is
an array of integers named . The array contains all odd numbers
from to . A loop has been used to enumerate all the numbers in
this array. You can see how simple it is to enumerate via a
loop. A temporary variable in the code above is required,
followed by the keyword and the name of the collection.
[img]
HTML https://github.com/mdsakib0012/image/blob/main/phone%20number.png?raw=true[/img]
HTML https://b2bphonelist.com/
Each time the loop iterates, the corresponding item of the
collection is stored in the variable and can be accessed within
the body of the loop. you can exit the loop at any time using a
statement inside the loop. For example, in the following code,
the remaining items in the collection will not be displayed on
the screen and the loop will exit if the item is greater than
oddsodds in ifnumber rest In the above code snippet, Only odd
numbers from to will be displayed, and once the statement
enumeration exceeds the number greater than.
*****************************************************
Page 1 of 1