In a few examples of code I have seen the following when calling a class:
var foo = new Foo.bar();
In which it seems a method is being called upon instantiation. How would a class structure be set up to accommodation this? When I try to directly access a method when calling a new class like this I get an error: call to anonymous function.
Thanks!
Foois a pseudo-namespace, but really it’s just an object.baris an anonymous function that in this case saves a var namevariablein it’s scope.