... (x = 0, y = 0) { } this.x = x; this.y = y; var p = new Point(); p // { x: 0, y: 0 }除了簡潔,ES6 的寫法還有兩個好處:首先,閱讀程式的人可以立刻意識到哪些參數是 ...
確定! 回上一頁