Indeed, however you have to be careful about the outer scope that the assignment is happening in (because of IE): http://kangax.github.com/nfe/#jscript-bugs
The other option, if you are on Webkit, is to assign something to the `displayName` property of a function or method. This is explained really well here: http://www.alertdebugging.com/2009/04/29/building-a-better-j...
Re:Apple JavaScript Coding Guidelines
by solutionyogi on Sunday October 31, 2010 @11:37PM
(#1855257)
Yeah, I should have added the warning about JScript bugs. At least the first two bugs listed on that page has been fixed in IE9.
I prefer not to use anonymous function. I will use named function so that my stack trace is comprehensible when I am debugging.
becomes Also, what's up with naming the constructor function as 'myObject'. JS prototypical nature is confusing as is and using an example like this can only make it harder to understand.