code: function copySeries(series) {
    let newSeries = [], i, j;
    for (i = 0; i < series.length; i++) {
      let copy = {};
      for (j in series[i]) {
        if (series[i].hasOwnProperty(j)) {
          copy[j] = series[i][j];
        }
      }
      newSeries.push(copy);
    }
    return newSeries;
  }
docs: creates a shallow copy of each element of the array elements are expected to be objects