There may be a small (slightly weak) performance for expressing a function:
var func = function(){ };
This is called the so-called function expression . function statement , on the other hand, is your third example:
function func(){ }
Function statements are internally converted to function expressions using ECMA-/Javascript , so the reason it might (!) Be a little faster, but really, nothing to worry about.
Example B: shows an anonymous function , which also does not affect the performance of A and C.
jAndy source share