So recently, i often to come across instagram post that invokes javascript i.e. like this --> foo.bar().baz().qux();. The insertion of parameters can be done on so many levels. However from what i have just learned, in nested object literal, we can only do foo.bar.baz.qux(); or only one parameter insertion. Can anyone show how to create nested object literals that can be invoked like this --> foo.bar().baz().qux(); ? ^cheers,
this. It's so called chaining jscriptpatterns.blogspot.com/2012/09/chaining-pattern.html