I want to do this: log(variableOrFunction)
And be able to produce this: variableOrFunction: actualValue.
I tried this:
You can log them with a pair of braces around them ({}), which will create an object with the name of the variable as the key:
function someFunction() {};
const someOtherFunction = () => {};
const someValue = 9;
console.log({someFunction});
console.log({someOtherFunction});
console.log({someValue});
const renamed = someFunction;
console.log({renamed})