---
title: "Discussion on \"Why does console.log() return ‘undefined’?\" | Hashnode"
description: "Discussion on \"Why does console.log() return ‘undefined’?\". What is weird with console.log()?\nYou would have noticed while using your browser's console that something strange happens when you console.log() something. You get two return values as shown below.\n\nThe first value \"Chandler\" printed is as we expect..."
url: "https://hashnode.com/posts/why-does-console-log-return-undefined/63eb49044af0b950c2aa621e"
---

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

Discussion

# [Why does console.log() return ‘undefined’?](https://harshm09.hashnode.dev/why-does-console-log-return-undefined?utm_source=hashnode&utm_medium=feed)

What is weird with console.log()? You would have noticed while using your browser's console that something strange happens when you console.log() something. You get two return values as shown below. The first value "Chandler" printed is as we expect...

Feb 14, 2023 · 5 min read · harshm09.hashnode.dev  
Read the article

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

## Written by

[Harsh Mohite](https://hashnode.com/@harshm09)

@harshm09

  
[View profile](https://hashnode.com/@harshm09)

Web Developer

I am an aspiring web developer. Transitioning to tech from electrical engineering background. Learning everyday and sharing my journey.

## Responses 3

Markdown supported · ⌘↵ to post

[Sivasankaran](https://hashnode.com/@sivadevwiz)

[Sep 22, 2023](https://hashnode.com/posts/why-does-console-log-return-undefined/63eb49044af0b950c2aa621e/comment/650d2edd939d972b993245d3)

Very well explained with the examples so that we can try ourselves and learn

[Himanshu Kesarwani](https://hashnode.com/@himanshu800)

[Feb 14, 2023](https://hashnode.com/posts/why-does-console-log-return-undefined/63eb49044af0b950c2aa621e/comment/63ebd0b4344b6345d699bc33)

Awesome! Well Explained!

[Anand Baraik](https://hashnode.com/@anandbaraik)

[Feb 14, 2023](https://hashnode.com/posts/why-does-console-log-return-undefined/63eb49044af0b950c2aa621e/comment/63eb722a1a02604287e7dde8)

It was a great read brother.

[Harsh Mohite](https://hashnode.com/@harshm09)

[Feb 14, 2023](https://hashnode.com/posts/why-does-console-log-return-undefined/63eb49044af0b950c2aa621e/comment/63eb722a1a02604287e7dde8#reply-63eb7becce792e42b74704d5)

Thank you 😊
