Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Poll: Have you moved from JavaScript to CoffeeScript?. Parent comment
var sum=0,i=list.length; while(i--) sum += list[i].amount;
if it does: var sum=0,i=0,ln=list.length; while (ln-- && (sum += list[i++].amount));
but the for in syntax is nicer indeed.
There are no comments on this comment yet.
var sum=0,i=list.length; while(i--) sum += list[i].amount;
if it does: var sum=0,i=0,ln=list.length; while (ln-- && (sum += list[i++].amount));
but the for in syntax is nicer indeed.