function _set(obj) { for (var i in obj) { privateStore[i] = obj[i]; } };
function _get() { return privateStore; }; this.get = function () { return _get; }; this.set = function (obj) { return _set; }; } var stu = new student(); var set = stu.set(); set({ name: "张宇", ex: "男", age: 18 }); var get = stu.get(); console.log(stu); console.log(get());