Some code snipets written as I read 'Javascript: the Good Parts'