{"size": 501, "ext": "js", "max_stars_repo_path": "JS_SJMS/prototype/prototype01.js", "max_stars_repo_name": "cjcj5438/nodeinpractice-master", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "JS_SJMS/prototype/prototype01.js", "max_issues_repo_name": "cjcj5438/nodeinpractice-master", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "JS_SJMS/prototype/prototype01.js", "max_forks_repo_name": "cjcj5438/nodeinpractice-master", "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": 20.04, "max_line_length": 40, "alphanum_fraction": 0.4870259481}
function prototypeExtend() {
    //这里的F是用来缓存的
    let F = function () {},
        args = arguments,
        i = 0,
        len = args.length;
    for (; i < len; i++) {
        for (let j in args[i]) {
            F.prototype[j] = args[i][j];
        }
    }
    return new F()
}

let penguin = prototypeExtend({
    speed: 20,
    swin: function () {
        console.log('游泳速度', this.speed);
    },
    run: function () {
        console.log('奔跑速度', this.speed)
    }
});
penguin.run()
penguin.swin()