|
|
|
|
|
by Androsynth
5024 days ago
|
|
In JS, a singleton is a reference to a module. It is used to ensure you invoke the module only once. Global variables are irrelevant since your global namespace most likely resembles a tree structure. edit: you may be right about the command pattern, I've never used something like that. It may just be the example is half-assed though. |
|