摘要:
function User( properties ) {// Iterate through the properties of the object, and make sure// that it's properly scoped (as discussed previously)for ( var i in properties ) { (function(thiz){// Create a new getter for the propertythiz[ "get" + i ] = function() {return properties[i];};/ 阅读全文