4 ms·
That's minification. The actual source code almost certainly does `if (a) { ... }`, but the minifier will shorten that into `a&&...`, thereby saving multiple by
by adtac 9y ago
That's minification. The actual source code almost certainly does `if (a) { ... }`, but the minifier will shorten that into `a&&...`, thereby saving multiple bytes. Accumulate this over different if-clauses, and you're looking at serious savings.
- braindongle 9y agoAh, I see. Thanks. Interesting. The minifier must be smart enough to know that you're not doing anything with the return value, since the two aren't equivalent in that respect. false && console.log('foo'); //false if(false){ console.log('foo') }; //undefined