{"size": 449, "ext": "js", "max_stars_repo_path": "js/youhua/1.js", "max_stars_repo_name": "lcxhxf/fullstack_huoshan", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "js/youhua/1.js", "max_issues_repo_name": "lcxhxf/fullstack_huoshan", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "js/youhua/1.js", "max_forks_repo_name": "lcxhxf/fullstack_huoshan", "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": 24.9444444444, "max_line_length": 43, "alphanum_fraction": 0.5122494432}
function summation() {
    let map = new Map();
    return function (target) {
        if(map.has(target)) {
            console.log('已经计算过');
            return map.get(target)
        }
        let sum = 0;
        for (let i = 1; i <= target; i++) {
            sum += i;
        }
        map.set(target, sum)
        return sum;
    }
}
const summationWithMemo = summation();
console.log(summationWithMemo(100));
// console.log(summation(100));