Files
30-seconds-of-code/snippets/functionName.md
Angelos Chalaris 97c250bcfb Updated examples
2017-12-27 16:35:25 +02:00

325 B

functionName

Logs the name of a function.

Use console.debug() and the name property of the passed method to log the method's name to the debug channel of the console.

const functionName = fn => (console.debug(fn.name), fn);
functionName(Math.max) // max (logged in debug channel of console)