So I'm just about to add a new function to our every growing list of global ones (sigh) and noticed the last user used a variable assignment over simple function a(){}.
function aFunction(){
return null;
}
var bFunction = function(){
return null;
}
I created a test to see if it made a difference; It does, but a conflicting one. (chrome favours the simple function, while firefox the variable assignment).
Firefox: Function create (90+% slower) / Create with variable assignment (fastest)
Chrome: Function create (fastest) / Create with variable assignment (70+% slower)
I understand it's trivial but is there any reason for the discrepancy and is there a preferable way of doing this?