2 Replies Latest reply on May 29, 2008 8:56 PM by

    how to flatten an array splice?

      var foo:Array = [1, 2, 3 ];
      var bar:Array = [9,10 ];

      foo.splice(2, 0, bar) == [1,2,[9,10],3]

      How can i splice in bar so i get a single flat result [1,2,9,10,3]?

      I know i could loop over bar and splice in each individual member into foo, but is there a more efficient option?

      Thank you.