fork download
  1. var object = {
  2. x : [],
  3. init: function() {
  4. object.x = ['a', 'b', 'c'];
  5. }
  6. };
  7.  
  8. var ob2 = {
  9. init: function() {
  10. console.log( object.x ); // prints "[]"
  11. }
  12. };
  13. object.init();
  14. ob2.init();
Success #stdin #stdout 0.06s 10712KB
stdin
Standard input is empty
stdout
[ 'a', 'b', 'c' ]