js practice for the book <<secrets of the javascript ninjia>>