Skip to content

Commit 958a9e9

Browse files
author
eveningwater.123
committed
feat: 修改了代码段
1 parent 2645ffd commit 958a9e9

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

codes/javascript/ts/show.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
const show = (...el: HTMLElement[]) => [...el].forEach(item => (item.style.display = ''));
2+
3+
show(...document.querySelectorAll('img'));
4+
// Shows all <img> elements on the page

0 commit comments

Comments
 (0)