I have an arrow function that looks like this (simplified):
const f = arg => { arg.toUpperCase(); };
But when I call it, I get undefined
:
console.log(f("testing")); // undefined
Why?
Example:
const f = arg => { arg.toUpperCase(); };
console.log(f("testing"));
(Note: This is meant to be a clean, canonical dupetarget for the specific issue with arrow functions above.)