ES6-Class

1. 基本使用javascript (1)Class,類,一構造函數java a. 原生JS,例子函數 <script> //=================JS構造函數用法 function Point1(x,y){ this.x = x;//定義未來實例的屬性 this.y = y; } //給構造函數添加方法 Point1.prototype.toString1 = fu
相關文章
相關標籤/搜索