scratch pad for code from Secrets of the JavaScript Ninja book