摘要:
在没有使用coffee-script之前,我们写类是这样写的,感觉会有点繁锁://-------------抽象类形状--------------function Shape(edges) { this.edges = edges;}Shape.prototype.getArea = function() { return -1;}Shape.prototype.getEdges = function() { return this.edges;}//--------------三角形----------------function Triangle(bottom, heig... 阅读全文