Ahh, you probably won't be in Dublin for OSBarCamp so.
While my script answers your immediate question, the point of it was to understand all the elements within it.
- use strict and warnings, seems a pain at first but it will do 70% of your debugging
- When you have something like a confirmation dialog make a routine out of it, because you'll need to do it again. These routines can ultimately be built up into your own modules which take the drudgery out of development
- The ternary operator is quite useful(<condition>?true:false;)
- But as has been said above, in order to learn you have to make your own mistakes and the satisfaction of solving a puzzle is a great memory enforcement
BTW: Arshavin, brilliant or what ;)