@@ -144,3 +144,21 @@ new SandBox('dependencies', 'here', function(box){
144
144
* add required modules to ``` this ```
145
145
* then call callback with ``` this ```
146
146
* the callback is the users sandbox and get populated with the requested functionality
147
+
148
+ ## static members
149
+
150
+ * just add property to constructor function - as that's an object as well
151
+ * (normal methods are added to the prototype or the returned object)
152
+ * you can't call static methods on instance unless you add an alias to prototype
153
+ * when aliasing static method on prototype - careful if you use ``` this ``` within the method
154
+
155
+ ## private static members
156
+
157
+ * return constructor function via an immediate (self invoking) function
158
+ * variables within the immediate function are invisible outside (as usual)
159
+
160
+ ## constants
161
+
162
+ * no real way to do it in ES5
163
+ * just naming convention: all caps, and also worth making sure they're static
164
+ * ``` const ``` keyword coming in ES6
0 commit comments