On Aug 23, 11:06 pm, Nick Morgan <[email protected]> wrote: [...] > The function declaration `createUniqueId` is effectively hoisted to > the top of the script, so it actually *is* defined before you add the > `counter` property to it.
Not a big fan of that expression (hoisted). It might be what seems to be happening but what actually happens is that variable and function declarations (among other things) are processed first when an execution context is entered and before any code is executed. A better term (IMHO of course) would be "pre-processed", because not only does it infer that those parts of the code are processed before any other, but also actually describes what's happening. Hoisting makes me think of flags, which is unrelated and inconsistent. -- Rob -- To view archived discussions from the original JSMentors Mailman list: http://www.mail-archive.com/[email protected]/ To search via a non-Google archive, visit here: http://www.mail-archive.com/[email protected]/ To unsubscribe from this group, send email to [email protected]
