模拟Object.create

88 阅读1分钟
function create(proto) {
    function Fun() {

    }
    Fun.prototype = proto
    return new Fun()
}