摘要:
JavaScript is a class-less language, however classes can be simulated using functions.eg:// A car 'class'function Car(model) { this.model = model; this.color = 'silver'; this.year = '2012'; this.getInfo = function () { return this.model + ' ' + this.year; }}We can the 阅读全文