90/95

Toggle an element

To toggle the element, we update the display property:

const toggle = function(ele) {
    const display = ele.style.display;
    ele.style.display = display === 'none' ? 'block' : 'none';
};

Might be useful