What I did was (horribly, I might say), put THAT statement inside an "in-line"? self-executing function (sorry my lack of proper tems): var foo; (function() { foo = bar.match(); });
Is there a function or idiom to return the first non-null value from an array? What I really need, I think, is an aggregating coalesce; array_accum + something to process the array will work, though.