Top "Nested-loops" questions

A logical structure used in computer programming where two or more repeating statements are placed in a "nested" form (i.e., one loop is situated within the body of another).

How to break nested loops in JavaScript?

I tried this: for(i = 0; i < 5; i++){ for(j = i + 1; j < 5; j++){ break(2); } alert(1); } only to get: SyntaxError: …

javascript nested-loops break
Iterate Multi-Dimensional Array with Nested Foreach Statement

I think this might be a pretty simple question, but I haven't been able to figure it out yet. If …

c# foreach nested-loops
Looping through python regex matches

This has to be easier than what I am running into. My problem is turning a string that looks like …

python regex nested-loops
Break the nested (double) loop in Python

I use the following method to break the double loop in Python. for word1 in buf1: find = False for word2 …

python nested-loops
Find out which combinations of numbers in a set add up to a given total

I've been tasked with helping some accountants solve a common problem they have - given a list of transactions and …

algorithm math nested-loops accounting
How can I break an outer loop with PHP?

I am looking to break an outer for/foreach loop in PHP. This can be done in ActionScript like so: …

php for-loop nested-loops break
How do exit two nested loops?

I have been using Java for quite some time, yet my education in loops is somewhat lacking. I know how …

java loops break nested-loops
break in do while loop

What happens when breaking in nested loops? suppose the following code: for(int x = 0; x < 10; x++) { do { if(x == 4) …

c loops nested-loops
Creating a Christmas Tree using for loops

I am trying to make a christmas tree using for loops and nested for loops. For me to do that …

java for-loop nested-loops