|
|
|
|
|
by zanethomas
619 days ago
|
|
closures can encapsulate state and methods
classes are syntactic sugar emulating classes is, imo, exactly the problem using factory functions which create and return an object, with variables passed to and created in the function, handles encapsulation and there is no `this` to deal with |
|