首页 » About

About

(function() {
    function object(o) {
        function F() {}
        F.prototype = o;
        return new F();
    }
    function inheritPrototype(subType, superType) {
        var prototype = object(superType.prototype);
        prototype.constructor = subType;
        subType.prototype = prototype;
    }

    function Person(name, github) {
        this.name = name;
        this.github = github;
    }
    Person.prototype.sayName = function() {
        console.log(this.name);
    }
    Person.prototype.sayGithub = function() {
        console.log(this.github);
    }
    function subPerson(options) {
        Person.call(this, options.name, options.github);
        this.weibo = options.weibo;
        this.mail = options.mail;
    }
    inheritPrototype(subPerson, Person);
    var me = new subPerson({
        "name": "\u674e\u91d1\u6807",
        "mail": "moc.qq#ilknuht".split("").reverse().join("").replace("#", "@"),
        "weibo": "http://weibo.com/stormtea/",
        "github": "https://github.com/thunkli"
    });
    console.log(me)
})();