javascript,说起来几乎没人不知道,但要说有几成人是内行,恐怕就是一个小比例的圈子了,即使是在程序员群体;
所谓内行,至少要懂得继承机制;
Call by sharing
-
Call by sharing
赋值原理类似 python,见 《Python,你了解么?》; - Is JavaScript a pass-by-reference or pass-by-value language?
Object Properties & Property Attributes
- Object Properties;
-
Property Attributes;
两类 Property:Data Property 和 Accessor Property,有不同的 Attributes;
构造函数(Construction Function)
在构造函数中定义的属性和方法不是共享的,也不是可继承的;在 property prototype 对象中定义的则是共享的、可继承的;
参考
- xahlee.info,∑XAH;文章内容经常更新,符合自己的理念;
- A re-introduction to JavaScript (JS tutorial) @ MDN
- What is a good resource for learning JavaScript in depth? @ quora