{"size": 413, "ext": "js", "max_stars_repo_path": "Javascript-Algorithms-And-Data-Structures-Certification-300hours/Intermediate-Algorithm-Scripting/sum-all-numbers-in-a-range.js", "max_stars_repo_name": "gvsrusa/free-code-camp", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "Javascript-Algorithms-And-Data-Structures-Certification-300hours/Intermediate-Algorithm-Scripting/sum-all-numbers-in-a-range.js", "max_issues_repo_name": "gvsrusa/free-code-camp", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "Javascript-Algorithms-And-Data-Structures-Certification-300hours/Intermediate-Algorithm-Scripting/sum-all-numbers-in-a-range.js", "max_forks_repo_name": "gvsrusa/free-code-camp", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 19.6666666667, "max_line_length": 62, "alphanum_fraction": 0.5375302663}
function sumAll(arr) {
  let arrSumTotal = 0;
  for (let i = Math.min(...arr); i <= Math.max(...arr); i++) {
    arrSumTotal += i;
  }
  return arrSumTotal;
}

sumAll([5, 10]);

/* function sumAll(arr) {
  const arr0 = arr.sort((a, b) => a - b);
  const arrSumTotal = [];
  for (let i = arr[0]; i <=arr0[1]; i++) {
    arrSumTotal.push(i);
  }
  return arrSumTotal.reduce((a, b) => a + b);
}

sumAll([5, 10]); */
