What if you were told to sort them in to suits, and then give them to your friend who would sort each suit in to numerical order? That's not so bad. What order did those functions fire-off in again?!
Hang on, this cheeky person now wants you to sort two packs of cards! Why I oughtta!
Okay, let's return to our code, but this time we'll change the trace outputs. Very-little code is being changed here, but just look at what happens! Yep there's been a lot of code in this tutorial so far but just have a look at the trace outputs for this next example and everything will fall into place!

myLoop1();//call the first function

function myLoop1(){
        for(i=1; i<3; i++){
                trace("person one passes a deck of cards to person two");
                myLoop2();//call the second loop from within the first loop
        }
        trace ("finished deck");
}

function myLoop2(){
        for(j=1; j<5; j++){
                trace("__person two passes suit " + j +"/4 from deck " + i + " to person 3");
                myLoop3();//call the second loop from within the first loop
        }
        trace ("_finished sorting suit " + (j-1) + " of deck " + i);
}

function myLoop3(){
        for(p=1; p<13; p++){
                trace("______person three sorts card number " + p + "/12 from deck " + i+ ", suit " + j );
        }
        trace ("_finished sorting cards from suit " + j);
}

Is that spanky or what! ...and all I really did was change/add some traces.
[The eagle-eyed amongst you will have noticed that I changed the loop values for each loop too. We had two decks of cards, so the loop in function 1 had to iterate twice. There are four suits in every deck so function 2's loop had to iterate four times, and there are twelve cards in each suit so the last loop had to iterate twelve times. I also started my variables off at 1 rather than 0 to make the output easier to read]. Here's a bit of our output:

That's a lot of sorting(!) yet all we did was to tell each little loop to do it's bit, bite off a chunk of data, process it and then pass it on.
It works in reverse too, very much like a car assembly line.
Throw a bit of data at function1, it adds something (or calculates something) and passes the finished result to function2, and so on.

If you've ever seen or used XML you will know that it has a tree-structure, as does your folder-view in Windows Explorer (PC users: press the windows key and 'e' to bring up Windows Explorer). Let's have a look at them both. For Windows Explorer you will see something like this:

windows explorer screen shot

I have a CD in my drive. The CD is full of folders and in each folder I have files. Well that makes it much easier for me to find the movie I was looking for, because they are all grouped in a folder with the sensible name "movies".
XML is based on the same organisation principle:

example of XML code

You can see from the indentation of the code and the minus symbols that some items are 'contained' within others, they are grouped in a sensible way. There are three chapters but luckily they're all grouped within "chapters" so they're easy to find, and everything is contained within the book tags.
Hey I've got an idea...say I wanted to let the user retrieve all the chapter-titles for my book? Well, what if we pass the whole book to function 1, which in turn passes each chapter to function 2, which passes each chapter-title to function 3.......

I hope you're starting to see just how powerful all this can be. I've tried to keet this tutorial as generic as possible because loops can be used for so many things, not just sorting data, and I didn't want to get bogged down explaining strings or maths functions.....
What you do inside those loops and how many nesting levels you have is pretty much up to you. I'm sure you can find many more uses. Enjoy :)