---
title: "Discussion on \"Why does console.log() return 'undefined'?\" | Hashnode"
description: "Discussion on \"Why does console.log() return 'undefined'?\". Ever wondered what happens when your browser's console returns undefined upon execution? Read on to find out about it..."
url: "https://hashnode.com/posts/why-does-consolelog-return-undefined/63eca468594e01fde25fb859"
---

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

Discussion

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

Ever wondered what happens when your browser's console returns undefined upon execution? Read on to find out about it...

Feb 15, 2023 · 3 min read · niharikakesarwani.hashnode.dev  
Read the article

-   [#web-development](https://hashnode.com/tag/web-development)
-   [#technical-writing-1](https://hashnode.com/tag/technical-writing-1)
-   [#coding](https://hashnode.com/tag/coding)
-   [#nodejs](https://hashnode.com/tag/nodejs)
-   [#computer-science](https://hashnode.com/tag/computer-science)

## Written by

[Niharika Kesarwani](https://hashnode.com/@NiharikaKesarwani)

@NiharikaKesarwani · Maharashtra, India

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

Web Developer | neoG '23 | Ex-OYO | MIT Manipal '22 (CSE)

A 2022 B.Tech graduate in Computer Science from Manipal Institute of Technology, Manipal. A strong-willed, curious, and highly determined learner. Familiar with CLI, HTML, CSS, JavaScript, NodeJS, VanillaJS, ReactJS, Git, GitHub, Flutter, C, Python, Kotlin, and Java, amongst many others. Have several projects related to the above technologies, some of which my portfolio showcases. Forever eager to learn, grow and expand my knowledge!

## Responses 6

Markdown supported · ⌘↵ to post

[Pranita Fulsundar](https://hashnode.com/@pranita)

[Feb 18, 2023](https://hashnode.com/posts/why-does-consolelog-return-undefined/63eca468594e01fde25fb859/comment/63f0a37f34c25f8061772d3e)

Very well explained!

[Niharika Kesarwani](https://hashnode.com/@NiharikaKesarwani)

[Feb 18, 2023](https://hashnode.com/posts/why-does-consolelog-return-undefined/63eca468594e01fde25fb859/comment/63f0a37f34c25f8061772d3e#reply-63f0baf534c25f80617731c9)

Thank you, Pranita!

[Rahul Pandey](https://hashnode.com/@rahulpandey2396)

[Feb 17, 2023](https://hashnode.com/posts/why-does-consolelog-return-undefined/63eca468594e01fde25fb859/comment/63efe05ea7e6ca7a328c7772)

Well explained!

[Niharika Kesarwani](https://hashnode.com/@NiharikaKesarwani)

[Feb 18, 2023](https://hashnode.com/posts/why-does-consolelog-return-undefined/63eca468594e01fde25fb859/comment/63efe05ea7e6ca7a328c7772#reply-63f06d730e63a77a616fcd75)

Thank you, Rahul!

[Abin John](https://hashnode.com/@abinjohn)

[Feb 17, 2023](https://hashnode.com/posts/why-does-consolelog-return-undefined/63eca468594e01fde25fb859/comment/63eeecd73c9c765be7a462bc)

Lovely breakdowns!

[Niharika Kesarwani](https://hashnode.com/@NiharikaKesarwani)

[Feb 17, 2023](https://hashnode.com/posts/why-does-consolelog-return-undefined/63eca468594e01fde25fb859/comment/63eeecd73c9c765be7a462bc#reply-63ef468f46e2f1644c4f32a2)

Thank you, Abin!

[Jagrut Sharma](https://hashnode.com/@Jagrut)

[Feb 15, 2023](https://hashnode.com/posts/why-does-consolelog-return-undefined/63eca468594e01fde25fb859/comment/63ecd1247cedde50200b7900)

Nice explanation, especially the part about how code is executing in repl step by step. 👍

[Niharika Kesarwani](https://hashnode.com/@NiharikaKesarwani)

[Feb 15, 2023](https://hashnode.com/posts/why-does-consolelog-return-undefined/63eca468594e01fde25fb859/comment/63ecd1247cedde50200b7900#reply-63ecdc1d7cedde50200b7ae3)

Thank you, Jagrut! Glad you liked it!

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

[Feb 15, 2023](https://hashnode.com/posts/why-does-consolelog-return-undefined/63eca468594e01fde25fb859/comment/63ecce933fa8ff4ff00971de)

Nicely put everything!

[Niharika Kesarwani](https://hashnode.com/@NiharikaKesarwani)

[Feb 15, 2023](https://hashnode.com/posts/why-does-consolelog-return-undefined/63eca468594e01fde25fb859/comment/63ecce933fa8ff4ff00971de#reply-63ecdbe23fa8ff4ff00973fe)

Glad you liked it, Anand!

[Kavitha M D](https://hashnode.com/@Kavithamd)

[Feb 15, 2023](https://hashnode.com/posts/why-does-consolelog-return-undefined/63eca468594e01fde25fb859/comment/63ecc1613fa8ff4ff0096efd)

Nice, you made it so simple to understand !!

[Niharika Kesarwani](https://hashnode.com/@NiharikaKesarwani)

[Feb 15, 2023](https://hashnode.com/posts/why-does-consolelog-return-undefined/63eca468594e01fde25fb859/comment/63ecc1613fa8ff4ff0096efd#reply-63ecc4523fa8ff4ff0096fba)

Thank you, Kavitha! Glad you liked it!
