search for: allthese

Displaying 1 result from an estimated 1 matches for "allthese".

Did you mean: allthe
2006 Apr 10
0
Proposal for Try.allThese()
...It''s useful in situations where you have a lot of if(object) { /* do stuff with object */ } statements in a row. The return value wasn''t important to me at the time. so I just chucked it into an array. Perhaps someone could suggest something better to return? So here it is: Try.allThese = function(){ var returnValue = []; for (var i = 0; i < arguments.length; i++) { var lambda = arguments[i]; try { returnValue.push(lambda()); } catch (e) { returnValue.push(false); } } return returnValue; }; -- Andrew