For Paul-B - I appreciate that, but the guy just wanted the absolute basics as a 3x3x3 is his first 'major' project since taking up the Arduino experience, and he was getting confused with shift registers, bit - shifting and other stuff that he'd seen from other sketches. I kept it as simple as I could without the need for shift registers, MAX7219 or other similar ICs. The cube from this sketch just takes the 27 LEDs, 3 Transitors, 3 x 22k ohm Resistors and 9 x 420 ohm Resistors and an Arduino Nano / Uno. The sketch is as simple as I can make it, based on the knowledge he already has accumulated.
For TheMemberFormerlyKnownAsAWOL - As I said, this is a simple sketch just to get the guy started on a 3x3x3 cube using the language knowledge he already has and is comfortable with so that he's not scratching his head trying to figure out a relatively complex 'for' loop. He can easily follow what's happening with the function as it's written.