Files
30-seconds-of-code/snippets/functionName.md
Angelos Chalaris 611729214a Snippet format update
To match the starter (for the migration)
2019-08-13 10:29:12 +03:00

16 lines
368 B
Markdown

---
title: functionName
tags: function,utility,beginner
---
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.
```js
const functionName = fn => (console.debug(fn.name), fn);
```
```js
functionName(Math.max); // max (logged in debug channel of console)
```