{"size": 334, "ext": "js", "max_stars_repo_path": "easy/add-up-the-numbers-from-a-single-number/code.js", "max_stars_repo_name": "anik-ghosh-au7/edabit-javascript-challenges", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "easy/add-up-the-numbers-from-a-single-number/code.js", "max_issues_repo_name": "anik-ghosh-au7/edabit-javascript-challenges", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "easy/add-up-the-numbers-from-a-single-number/code.js", "max_forks_repo_name": "anik-ghosh-au7/edabit-javascript-challenges", "max_forks_repo_forks_event_min_datetime": "2020-05-28T09:21:19.000Z", "max_forks_repo_forks_event_max_datetime": "2020-05-28T09:21:19.000Z"}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 30.3636363636, "max_line_length": 95, "alphanum_fraction": 0.619760479}
function addUp(num) {
  // return [...Array(num).keys()].map(item => ++item).reduce((result, item) => result+item,0);
  return [...Array(num).keys()].map(item => ++item).reduce((result, item) => result+item, 0);
}

console.log(addUp(4)); // 10
console.log(addUp(13)); // 91
console.log(addUp(600)); // 180300

module.exports = addUp;
