How to hide and show an HTML element with JavaScript

Hiding and showing HTML elements with JavaScript is probably something that every software developer has to do at some point in their career.