Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Reducing Code Nesting . Parent comment
There's one (and only one) non-DOM jquery method I enjoy for that sort of things, because it avoids repetition: $.proxy(Object, String)
accum.push.bind(accum)
$.proxy(accum, 'push')
Of course, things would still be better if javascript just bound method on instance prototype lookup.
There are no comments on this comment yet.
There's one (and only one) non-DOM jquery method I enjoy for that sort of things, because it avoids repetition: $.proxy(Object, String)
becomes I think it spells out the intent better than the bind dance.Of course, things would still be better if javascript just bound method on instance prototype lookup.