Class 在語法上更加貼合面向對象的寫法
Class 實現繼承更加易讀、易理解
更易於寫 java 等后端語言的使用
本質還是語法糖,使用 prototype
Class語法
typeof MathHandle // 'function'
MathHandle.prototype.construcroe === MathHandle // 構造函數的顯示原型有個construvtor等於它的構造函數本身
m.__proto__ === MathHandle.prototype // true new時候,隱式原型等於顯示原型
js構造函數