Hacker News new | ask | show | jobs
by Skalman 5038 days ago
Nope:

TypeError: document.getElementsByTagName("p").filter is not a function

Because you don't get an array, only something array-like.

1 comments

And this discussion over how to write a trivial loop is why I stay far away from vanilla js unless performance absolutely forces me to optimize.
This is why I program with a code editor / interactive console that tells me these things as I'm typing :-)