Hacker News new | ask | show | jobs
by stasgavrylov 2272 days ago
Great resource. I'm wondering whether the examples are your own or copied from across the web?

I just wanted to point out that some of them are a bit outdated, and I belive it'd be nice to maintain this list as a reference with modern approaches.

For example, there's no need to use `appendChild`, because DOM today has a more versatile `append` method.

And `[].forEach.call(cols, function(col) {...}` would look much better and more declarative as `for (const col of cols) { ... }`.

These are just first 2 examples that I noticed.

1 comments

Your proposed changes are not supported in IE 11. The snippets are advertised as IE 11+ compatible on the landing page.
You're correct, but let/const don't have full support in IE11 either. I understand that people are still supporting IE, but still, this website could stay relevant longer if the examples were written in ESNext.