---
title: "Discussion on \"Why do functions return undefined?\" | Hashnode"
description: "Discussion on \"Why do functions return undefined?\". What are functions?\nFunctions are the 🧡 of Javascript. They are the building blocks and one of the most critical parts of Javascript. They may or may not take some input to produce output or return a value.\nfunction lifeIsBeautiful(name){\n    return..."
url: "https://hashnode.com/posts/why-do-functions-return-undefined/63ea29f45419932e5ea066b1"
---

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

Discussion

# [Why do functions return undefined?](https://thecoderkage.dev/why-do-functions-return-undefined?utm_source=hashnode&utm_medium=feed)

What are functions? Functions are the 🧡 of Javascript. They are the building blocks and one of the most critical parts of Javascript. They may or may not take some input to produce output or return a value. function lifeIsBeautiful(name){ return...

Feb 13, 2023 · 2 min read · thecoderkage.dev  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#web-development](https://hashnode.com/tag/web-development)
-   [#functions](https://hashnode.com/tag/functions)
-   [#functional-programming](https://hashnode.com/tag/functional-programming)
-   [#consolelog](https://hashnode.com/tag/consolelog)

## Written by

[Sandhya Rajwanshi](https://hashnode.com/@TheCoderKage)

@TheCoderKage · India

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

< BELIEVEIT🍥/>

I am a web developer diving deep into the beautiful world of coding. Building amazing stuff.

## Responses 2

Markdown supported · ⌘↵ to post

[Aman Verma](https://hashnode.com/@TheGoodDev)

[Feb 26, 2023](https://hashnode.com/posts/why-do-functions-return-undefined/63ea29f45419932e5ea066b1/comment/63fb03ca42967b0d40d3543f)

I remember wondering for hours why console.log returns undefined. I get it now. Great article!

[Sandhya Rajwanshi](https://hashnode.com/@TheCoderKage)

[Feb 26, 2023](https://hashnode.com/posts/why-do-functions-return-undefined/63ea29f45419932e5ea066b1/comment/63fb03ca42967b0d40d3543f#reply-63fb487aa13f5e02f6797b59)

Happy to know that it was useful..

[Sahil Bhosale](https://hashnode.com/@sahilbhosale08)

[Feb 14, 2023](https://hashnode.com/posts/why-do-functions-return-undefined/63ea29f45419932e5ea066b1/comment/63eb5a7ece792e42b746fe3f)

Nicely Explained
