News for hackers. Stuff that matters.
Re:Avoid Null Checks by Replacing Finders with Tellers by wwweston on Monday June 17, 2013 @01:15PM (#5894431)
Anybody who's written much JavaScript without a jQuery-like function should appreciate this too -- used to be much more common to have code littered with checks to see if a dom element existed, then do an operation if it did. Performing an operation over a set (including empty) of elements seems easier.
Re:Avoid Null Checks by Replacing Finders with Tellers by ape4 on Monday June 17, 2013 @01:34PM (#5894555)
Yes I thought of jQuery also. jQuery always returns an array. If it has no elements that means the thing wasn't found.