code: function sumArray(array) {
    return array.filter(defined).reduce((x, y) => x + y, null);
  }
docs: Sums an array, treating undefined's as 0 in the sum, but leaving undefined + undefined = undefined. (Note the "defined" function catches null and defined.)