Saturday 24 August 2013

JavaScript Design Patterns Help Needed: Loose Augmentation of Modules

JavaScript Design Patterns Help Needed: Loose Augmentation of Modules

pstrongEdit for clarity/strong - @Qantas94Heavy - I understand what it is
saying or supposed to do, what I don't understand is emwhy/em amp; more
importantly emhow/em it works:/p pI was reading an advanced tutorial on
the JS Module Pattern, and it gave this example:/p precodevar MODULE =
(function (my) { // add capabilities... return my; }(MODULE || {}));
/code/pre pThe thing that is bugging me (and I need your help with) is the
last statement:/p precode(MODULE || {})); /code/pre pi'm having trouble
understanding the syntax rules behind this that make it possible. After
doing some searching for keywords, JavaScript Module Syntax, and Module
Pattern Short Hand I found that I'm still not quite understanding the
foundation behind this./p pWould someone please explain or point me in the
right direction for grokking this/gaining a deeper understanding?/p
pSincerely, gggi/p

No comments:

Post a Comment