5 ms·
For anyone still/stuck with console debugging, “pro” tip: JS ignores the value of every statement in a comma-separated expression except the last one. So you c
by eyelidlessness 6y ago
For anyone still/stuck with console debugging, “pro” tip:
JS ignores the value of every statement in a comma-separated expression except the last one. So you can do trash like this:
const foo = (bar) => (
console.log(bar),
someComputationOf(bar)
);
And log-debug without restructuring your otherwise pure function.