DEV Community

Discussion on: 10 Clean code examples (Javascript).

Collapse
 
sergei profile image
Sergei Sarkisian


const { ['log']: c } = console;
c("something");

Oh, wouldn't like to get this in any legacy project. It's easy to search console.log string and remove any instances from the code. And that's much harder to find the instances in the case that author suggests.