var Book = ( function () {
var bookNum = 0;
function checkBook (name) {
}
return function (newId, newName, newPrice) {
var name, price;
function checkID(id) {}
this.getName = function () {};
this.getPrice = function () {};
this.setName = function () {};
this.setPrice = function () {};
this.id = newId;
this.copy = function () {};
bookNum++;
if (bookNum > 100) throw new Error('我们仅出版100本书')
this.setName(newName);
this.setPrice(newPrice);
}
})();
Book.prototype = {
isJSBook: false,
display: function () {}
}
console