On 2/19/07, Ken Snyder <[EMAIL PROTECTED]> wrote:
>
>
> function coalesce() {
>   return $A(arguments).find(function(arg) {
>     return !(arg===undefined || arg===null);
>   }
> }
>
> example = coalesce(example, null);


I'd stick to the boolean checks and ternary operator, thank you. This is
indeed short but is also insanity regarding performance...

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to