30 seconds of code

  Back to Home

show

browsercssbeginner

Shows all the elements specified.

Use the spread operator (...) and Array.prototype.forEach() to clear the display property for each element specified.

const show = (...el) => [...el].forEach(e => (e.style.display = ''));