【发布时间】:2011-08-25 06:52:01
【问题描述】:
我看到了这种模式:
Money = (function() {
function Money(rawString) {
this.cents = this.parseCents(rawString);
}
});
在这个CoffeeScript screencast preview。 (截屏主页是here。)
现在,我不明白这种模式。有一个 Money 函数包含一个 Money 函数。那是怎么回事?
谁能解释一下?
【问题讨论】: