JavaScript tricks pros actually use — and why

Every snippet below explains the reasoning, not just the syntax: what problem it solves, what it replaces, and where it bites. Several run right on this page — press Run and watch the output.