摘要: 首先,ES6 的 class 属于一种“语法糖”,所以只是写法更加优雅,更加像面对对象的编程,其思想和 ES5 是一致的。 function Point(x, y) { this.x = x; this.y = y; } Point.prototype.toString = function() { 阅读全文
posted @ 2019-01-22 15:36 JoeJoan 阅读(775) 评论(0) 推荐(1) 编辑