credit MDN for a huge chunk of this content, or at least for its organization.