On 10/13/06, Brad Ediger <[EMAIL PROTECTED]> wrote:
Ruby and Perl do this. IIRC, it started off as a Perl idiom.
On Oct 13, 2006, at 11:58 AM, Ken Snyder wrote:Is this "defaulting" behavior found in any other languages besides _javascript_? I tried it in PHP; PHP seems to always return true or false;
--Ken
Brad Ediger wrote:...{a: 3} || {} // ==> {a: 3}
null || {} // ==> {}
null || 0 // ==> 0
--
Ryan Gahl
Application Development Consultant
Athena Group, Inc.
Inquire: 1-920-954-9798 x2903
Blog: http://www.someElement.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" 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/rubyonrails-spinoffs
-~----------~----~----~----~------~----~------~--~---
