Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



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.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: