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 = ''));

使用样例

show(...document.querySelectorAll('img')); // Shows all <img> elements on the page