index.js
function sum(arr) {
  var len = arr.length;
  var num = 0;
  while (len--) num += Number(arr[len]);
  return num;
}
function sum(arr) {
  var len = arr.length;
  var num = 0;
  while (len--) num += Number(arr[len]);
  return num;
}
function sum ( arr ) { var len = arr . length ; var num = 0 ; while ( len -- ) num += Number ( arr [ len ] ) ; return num ; }
Calculate the sum of an array.
@param  {Array} `arr` Array
@return {Number} Sum
Calculate the sum of an array .