I was looking through some of gmails javascript (writing an extension), and I saw (0, _.ab)(a) or options in all places. What does it mean?
I tried some tests like
function a(a,b,c){ console.dir(a+b+c); } (0, a)(1,2,3)
However, I cannot understand why they simply will not name a(1,2,3) directly. Does this give an odd advantage when using (0,a) ?
I did jsperf ( http://jsperf.com/direct-vs-0-func-calls ) to test this, and a(1) vs (0,a)(1) seem identical.
Edit: as far as I can make out Google, use it only where they need to call the function directly, for example if ((0, _.wa)(a)) (taken from gmail source)
javascript function
Joey ciechanowicz
source share