var Check = function() {};
Check .prototype = {
checkName: function() {
return this; //返回当前对象,方便调用
},
checkPassword: function() {
return this;
},
checkAddress: function() {
return this;
}
}
var check = new Check();
check.checkName().checkPassword().checkAddress()
此时:check.__proto__ === Check.prototype
Object {checkName: function, checkPassword: function, checkAddress: function}