Comment on Ask HN: Advice for 14-year-old who wants to learn to code?Comments−nailer11yI 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.−_RPM11yArray.prototype.forEach.call(..) is more efficient because it doesn't create a new array.−nailer11yFixing NodeList.prototype.forEach() is best because it doesn't read awfully but this is someone learning to program, not to fix the DOM API.
Comments
I started in OSes and filesystems, but I recommend hitting Cmd+Alt+i on this page and typing:
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.