linq.js
function sum(transform) {
  let sum = 0;
  let seq = typeof transform === 'function' ? this.select(transform) : this;

  for (let item of seq) {
    sum += Number.parseFloat(item);
  }

  return sum;
}
function sum(transform) {
  let sum = 0;
  let seq = typeof transform === 'function' ? this.select(transform) : this;

  for (let item of seq) {
    sum += Number.parseFloat(item);
  }

  return sum;
}
function sum ( transform ) { let sum = 0 ; let seq = typeof transform === 'function' ? this . select ( transform ) : this ; for ( let item of seq ) { sum += Number . parseFloat ( item ) ; } return sum ; }
Computes the sum of a sequence.

@param transform The transform function called per interaction.
@return The sum of the values in the sequence.
Computes the sum of a sequence .