notes and examples from Effective Javascript