---
title: "Discussion on \"Easy console.log() inside one liner functions\" | Hashnode"
description: "Discussion on \"Easy console.log() inside one liner functions\". Let's say we want to log obj inside this .map() function here:\nconst arr = [\n  { val: 1 },\n  { val: 2 },\n  { val: 3 }\n];\n\nconst nums = arr.map(obj => obj.val*2);\n\nWell, dang! Now we have to convert this to a multi-line function, right?\nconst nums = a..."
url: "https://hashnode.com/posts/easy-consolelog-inside-one-liner-functions/618be8bbf991b025366e15c6"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Easy console.log() inside one liner functions](https://blog.jsbits-yo.com/easy-consolelog-inside-one-liner-functions?utm_source=hashnode&utm_medium=feed)

Let's say we want to log obj inside this .map() function here: const arr = \[ { val: 1 }, { val: 2 }, { val: 3 } \]; const nums = arr.map(obj => obj.val\*2); Well, dang! Now we have to convert this to a multi-line function, right? const nums = a...

Nov 10, 2021 · 1 min read · blog.jsbits-yo.com  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#tricks](https://hashnode.com/tag/tricks)
-   [#codenewbies](https://hashnode.com/tag/codenewbies)

## Written by

[JS Bits with Bill](https://hashnode.com/@JS-Bits-Bill)

@JS-Bits-Bill

  
[View profile](https://hashnode.com/@JS-Bits-Bill)

Byte-sized dev tips, tricks, and laughs for you 🤡

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
