function extend(arr, data) {
  const extension = Array.isArray(data) ? data : [data];
  const length = extension.length;
  for (let i = 0; i < length; i++) {
    arr[arr.length] = extension[i];
  }
}
@param {Array<VALUE>} arr The array to modify.
@param {!Array<VALUE>|VALUE} data The elements or arrays of elements to add to arr.
@template VALUE