Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

5
  • 1
    Got a goof there on function() MY... Commented Aug 13, 2012 at 22:37
  • 1
    @Demian Brecht, and what about var foo = function foo() {...} approach? Commented Aug 16, 2012 at 11:40
  • @shabunc: What about it? It's listed in the last paragraph of my answer. Commented Aug 16, 2012 at 15:10
  • @Demian Brecht, no, actually in last paragraph variable is called foo and function is called MY_function Commented Aug 16, 2012 at 15:12
  • @shabunc: The name doesn't matter. What matters is the value in the callstack. As an example, [NAMESPACE]_[fn name] is the convention used by Mozilla. The name itself doesn't matter as long as your convention is consistent throughout your project. Commented Aug 16, 2012 at 16:31