- Everything in JavaScript is an Object. Even functions
- Every object is always mutable
- The dot operator is equivalent to de-referencing by hash (e.g.,
foo.bar === foo["bar"]) - The
newkeyword creates an object that class constructors run inside of, thereby imprinting them - Functions are always closures (combine w/ previous rule to create OOP)
- The
thiskeyword is relative to the execution context, not the declaration context - The
prototypeproperty is mutable
来自 http://alex.dojotoolkit.org/?p=535