Difference between revisions of "Sandbox"

From Organic Design wiki
m
(not natively cuz objects all resolve to "object" when used in string context (such as an array key context) - but we can override toString)
Line 5: Line 5:
 
$a={};
 
$a={};
 
$b={};
 
$b={};
 +
 +
$a.toString = function() { return 'a'; }
 +
$b.toString = function() { return 'b'; }
  
 
$a.foo='baz';
 
$a.foo='baz';

Revision as of 19:36, 29 August 2012