News for hackers. Stuff that matters.
Re:Javascript Fundamentals: ‘this’ keyword by wruza on Sunday August 26, 2018 @03:20AM (#17844727)
>This line "(a.c || [])()" is bothering me -- why on earth would this line exist in any program?

A variation of it is valid for method selection, such as:

  (cond ? a.foo : b.bar)();
or, for method fallback:

  (a.foo || a.fooDefault)();
Neither does work in js, though.
Re:Javascript Fundamentals: ‘this’ keyword by anonytrary on Tuesday August 28, 2018 @03:52AM (#17857216)
This is useful and works with functions that don't use `this` (like arrow functions).