JavaScript - cheat sheet

Common JavaScript patterns.