Skip to content

Comment on Ask HN: Advice for 14-year-old who wants to learn to code?

Comments

I started in OSes and filesystems, but I recommend hitting Cmd+Alt+i on this page and typing:

    var comments = document.querySelectorAll('.comment');

    [].forEach.call(comments, function(comment){comment.style.backgroundColor = "#ffaa44"})
Instead.

Array.prototype.forEach.call(..) is more efficient because it doesn't create a new array.

Fixing NodeList.prototype.forEach() is best because it doesn't read awfully but this is someone learning to program, not to fix the DOM API.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.