made notes on examples on avoiding global, reinitializing var each time function called is slow, using closure to return function with access to parent variable, coding style brace left is wrong
finalised notes - need to write up on blog