var closure = (function () {
    var name = 'jinh'; // private variable

    var that = this;
    var exports = {
        // setter
        setName: function (name) {
            that.name = name;
        },
        // getter
        getName: function () {
            return that.name;
        }
    };

    return exports;
})();
jinnnh's profile image

jinnnh

2018-11-08 11:00

Read more posts by this author