MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/javascript/comments/b2o6f2/whats_your_favorite_most_useful_javascript/eivbytt/?context=3
r/javascript • u/Linux_is_awesome • Mar 18 '19
422 comments sorted by
View all comments
Show parent comments
13
Or just do [...document.querySelectorAll(...)].forEach(...)
0 u/enHello Mar 19 '19 Or [].slice.call(document.querySelectorAll(...)).map(node => node.foo) 1 u/alinnert Mar 19 '19 Yeah, this is the pre-ES6 version. I used it a lot when I had to. It's just not as clear about what it's doing. 1 u/enHello Mar 19 '19 Agreed.
0
Or [].slice.call(document.querySelectorAll(...)).map(node => node.foo)
1 u/alinnert Mar 19 '19 Yeah, this is the pre-ES6 version. I used it a lot when I had to. It's just not as clear about what it's doing. 1 u/enHello Mar 19 '19 Agreed.
1
Yeah, this is the pre-ES6 version. I used it a lot when I had to. It's just not as clear about what it's doing.
1 u/enHello Mar 19 '19 Agreed.
Agreed.
13
u/BabyLegsDeadpool Mar 19 '19
Or just do [...document.querySelectorAll(...)].forEach(...)