Nicky's been a maker since his grandma bought him his first *real* toolbox when he was 4. His aunt taught him JavaScript when he was 12 and almost 20 years later, he still can't stop programming.
And it isn't working, so you want to add a log to see what's going on. But it's a pain because you think you need to build out the entire function body like this:
One little one for JS...
If you want to debug code like this:
And it isn't working, so you want to add a log to see what's going on. But it's a pain because you think you need to build out the entire function body like this:
Which is also annoying because once it works, you need to remove all that extra syntax.
Instead, you can use a comma, like this:
JS will evaluate both statements and send the value of the final one.
It's a little thing, but makes my life a little nicer on a daily basis :)