Top "Loops" questions

Loops are a type of control flow structure in programming in which a series of statements may be executed repeatedly until some condition is met.

Iterator Loop vs index loop

Possible Duplicate: Why use iterators instead of array indices? I'm reviewing my knowledge on C++ and I've stumbled upon iterators. …

c++ loops c++11 indexing iterator
How to loop over a Class attributes in Java?

How can I loop over a class attributes in java dynamically. For eg : public class MyClass{ private type1 att1; private …

java attributes loops
How to concat string + i?

for i=1:N f(i) = 'f'+i; end gives an error in MatLab. What's the correct syntax to initialize an …

string matlab loops for-loop octave
In Ruby, how do I skip a loop in a .each loop, similar to 'continue'

In Ruby, how do I skip a loop in a .each loop, similar to continue in other languages?

ruby loops syntax iteration
Counter inside xsl:for-each loop

How to get a counter inside xsl:for-each loop that would reflect the number of current element processed. For example …

xml xslt loops
How to split a long array into smaller arrays, with JavaScript

I have an array of e-mails (it can be just 1 email, or 100 emails), and I need to send the array …

javascript jquery arrays loops
Indexes of all occurrences of character in a string

The following code will print 2 String word = "bannanas"; String guess = "n"; int index; System.out.println( index = word.indexOf(guess) ); …

java loops indexing character
How to iterate over array of objects in Handlebars?

This might seem a silly question but I can't seem to find the answer anywhere. I'm hitting this Web API …

arrays loops each handlebars.js
Null check in an enhanced for loop

What is the best way to guard against null in a for loop in Java? This seems ugly : if (someList != …

java syntax loops for-loop
Iterating through a list to render multiple widgets in Flutter?

I have a list of strings defined like this: var list = ["one", "two", "three", "four"]; I want to render the …

flutter loops dart