index.js
function avg(vct) {
  if (vct.length === 0) {
    return 0;
  }
  return (vct.reduce(function (a, c) { return a + c; }, 0) / vct.length);
}
function avg(vct) {
  if (vct.length === 0) {
    return 0;
  }
  return (vct.reduce(function (a, c) { return a + c; }, 0) / vct.length);
}
/*
Auxiliary Functions
 Average of number vector (0 if empty)