A
A
Andrew Kolomiets2021-06-04 12:50:11
SVG
Andrew Kolomiets, 2021-06-04 12:50:11

How can you simplify a line of code?

How can you simplify a line of code?

document.querySelectorAll('#id, #id2').forEach(a => {a.style.display = 'none'})

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
RAX7, 2019-02-16
@SerjAndreev

You can draw a stripe on svg with js and animate it with stroke-dashoffset

A
Alexey Ukolov, 2021-06-04
@Coolam

No way (well, curly brackets are not needed).
What do you not like about her?
It can only be made more difficult, because the arrow functions and forEach in NodeList did not exist in older browsers.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question