js object-oriented topics for

** ** oaks from little acorns

1. Create an object by naming conventions have private property: an object beginning with __ as private object, but actually have access to.
2. self-executing function, return it to an object, place next to the return of private property can be written (but not externally accessible) --- refers to the function scope
3. or finish inside the property (in function) return finished these new property or method name. And assigned to the new object.
4. When the attribute names and attribute values are the same, can be written as

return
{A,
B,
C,
}
instead
return
{
A = A,
B = B,
C = C,
}
. 5, if the scope of authority under certain circumstances not be selected out of one set of self-executing function.

Guess you like

Origin www.cnblogs.com/zhushuaiqi/p/11943522.html