Pushes the items of that sequence to an array.

JavaScript array:

var targetArray = [];
Enumerable.create(1, 2, 3)
          .pushToArray(targetArray);

for (var i = 0; i < targetArray.length; i++) {
    // [0] => 1
    // [1] => 2
    // [2] => 3
    var item = targetArray[i];
}

ObservableArray

import { ObservableArray }  from "data/observable-array";

var targetArray = new ObservableArray();
Enumerable.create('MK', 'TM')
          .pushToArray(targetArray);

for (var i = 0; i < targetArray.length; i++) {
    // [0] => 'MK'
    // [1] => 'TM'
    var item = targetArray.getItem(i);
}