Bah, maybe you could modify the isPrime function to take the array as a parameter? To test every possible number leading up to the num variable, seems a little wasteful. I'll think over it some more.
You can use += with strings? Shweet.
The basic details are:
1. Check to see if the array is ordered. Length doesn't matter.
2. If the array isn't in order, completely randomize the order of the array elements.
3. Return to step 1 until the array is sorted.
The world's most inefficient sorting algorithm. That website does alot of lulz-worthy pieces like that.
EDIT: You haven't covered big O notation? It's basically something programmers use to approximate how efficient an algorithm is. You suppose the maximum inputs for all loops is n, and trace the program with that assumption in mind.