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