原书出处
JavaScript权威指南(原书第6版)
s.x+this.y*this.y);
var ratio=newvalue/oldvalue; this.x*=ratio; this.y*=ratio; },//theta是只读存取器属性,它只有getter方法 get theta(){return Math.atan2(this.y,this.x);} }; 注意在这段代码中getter和setter里this关键字的用法。JavaScri
pt把这些函数当做对象的方法来调用,也就
原书定位详情
来源:a19c7933-4eda-4176-aebd-30fe7e1ad292
正文位置:extracted/OReilly精品图书系列共21册(《Javascript权威指南》、《机器学习:实用案例解析》、《编写可读代码的艺术》、《算法精解》等)/_epub-src/text/part0018.html
EPUB SHA-256:06582ecdf071724c9e218bc2698d2fff4e82a992d672b287e4c2e6092c924bcf