---
title: "Discussion on \"Function Declaration vs Function Expression: What’s the Difference?\" | Hashnode"
description: "Discussion on \"Function Declaration vs Function Expression: What’s the Difference?\". Suppose you need to perform an operation many times in code, for example finding the maximum of two numbers. Are you okay with writing the complete code again and again?\nlet a = 10;\nlet b = 20;\nlet ma"
url: "https://hashnode.com/posts/function-declaration-vs-function-expression-what-s-the-difference/69b6c6d6f4eb2f8b04967338"
---

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

Discussion

# [Function Declaration vs Function Expression: What’s the Difference?](https://javascript-function.hashnode.dev/function-declaration-vs-function-expression-what-s-the-difference?utm_source=hashnode&utm_medium=feed)

Suppose you need to perform an operation many times in code, for example finding the maximum of two numbers. Are you okay with writing the complete code again and again? let a = 10; let b = 20; let ma

Mar 15 · 5 min read · javascript-function.hashnode.dev  
Read the article

-   [#chaicode](https://hashnode.com/tag/chaicode)
-   [#chaiaurcode](https://hashnode.com/tag/chaiaurcode)
-   [#chaicohort](https://hashnode.com/tag/chaicohort)
-   [#chaicode-webdev-cohort-2026](https://hashnode.com/tag/chaicode-webdev-cohort-2026)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#javascript-functions](https://hashnode.com/tag/javascript-functions)
-   [#function-in-js](https://hashnode.com/tag/function-in-js)
-   [#functions-in-js](https://hashnode.com/tag/functions-in-js)

## Written by

[Janardhan Verma](https://hashnode.com/@janardan-v)

@janardan-v · Delhi, India

  
[View profile](https://hashnode.com/@janardan-v)

Aspiring software developer documenting my journey in building, learning, and understanding technology. Computer Science student at NSUT Delhi.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
