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

On top of that, he could have just written "currentChunk++;" and skipped the comment entirely.


wouldn't that return the value of currentChunk before it was incremented? So it would need an additional line to be equivalent to the example (making it a bit more readable in my opinion):

  currentChunk++;
  this.chunks[currentChunk] = [];
Which is perhaps what you meant all along. Please excuse the pedantry.


Yeah, that's what I meant - instead of taking the shortcut with a comment explaining it, just don't take it in the first place.




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

Search: