3 ms·
My (newly discovered) favorite trick is using the comma operator. Using it, you can (admittedly horribly) log anything in the middle of any expression. This fo
by Kaze404 6y ago
My (newly discovered) favorite trick is using the comma operator. Using it, you can (admittedly horribly) log anything in the middle of any expression.
This for example will call `console.log(myVar)` and still call `someFunction(myVar, someOtherArgument)`.
myVar = "12345"
someFunction((console.log(myVar), myVar), someOtherArgument);
Pretty handy sometimes :)