in reply to Incrementing string arrays when used with foreach loops

Not quite. Your homework asks for a single level array created in a double loop. That array should have elements like "2 clubs". For part 3 you probably want to use rand to locate a card together with splice to remove the found cards.

I won't give you the code to do that since I like to strongly discourage doing other people's homework for them.

  • Comment on Re: Incrementing string arrays when used with foreach loops