o.fnTest = function(){ alert('Hello World') } o.fnTest = function fnTest(){ alert('Hello World') }
both seem to assign the function to o.fnTest. Most of the plugin libraries I've seen use the anomymous function assignment. The latter (a named, not anomymous function in FireBug) is easier to work with. Stack calls in Firebug show up with named, not anomymous functions. Are anomymous functions preferred because they save a few bytes of source code filesize or does the latter do something unwanted?