A small extra trick: If you use arrow functions without a body you can log and fallback to the original statement. Example starting point, you're wondering what message is. ``` const upperCase = (message) => message.upperCase() ``` Don't add a body, just log and continue: ``` const upperCase = (message) => console.log(message) || message.upperCase() ```
It is a bit subtle for my taste, though. My suggestion for clarity is to go ahead and make the function have a body with {}:
const upperCase = (message) => {
console.log(message);
return message.upperCase();
};
Of course you may disagree, but no argument there, as I said it's a matter of taste.(BTW backticks, either triple or single, do not work on HN. Indent by two spaces if you want code formatting.)