363 B
363 B
title, tags
| title | tags |
|---|---|
| functionName | function,beginner |
Logs the name of a function.
- Use
console.debug()and thenameproperty of the passed method to log the method's name to thedebugchannel of the console.
const functionName = fn => (console.debug(fn.name), fn);
functionName(Math.max); // max (logged in debug channel of console)