---
title: "Discussion on \"Function Declaration vs Function Expression: What Is the Difference?\" | Hashnode"
description: "Discussion on \"Function Declaration vs Function Expression: What Is the Difference?\". What Functions Are and Why We Need Them\nA function is a reusable block of code that performs a specific task. Instead of repeating the same logic multiple times, we define it once and call it whenever"
url: "https://hashnode.com/posts/function-declaration-vs-function-expression-what-is-the-difference/69fc37133d9a9c101972eb19"
---

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

Discussion

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

What Functions Are and Why We Need Them A function is a reusable block of code that performs a specific task. Instead of repeating the same logic multiple times, we define it once and call it whenever

May 7 · 4 min read · blog.shyamhz.dev  
Read the article

-   [#chaicode](https://hashnode.com/tag/chaicode)
-   [#chaiaurcode](https://hashnode.com/tag/chaiaurcode)
-   [#chai-aur-javascript](https://hashnode.com/tag/chai-aur-javascript)
-   [#arrow-functions-in-javascript](https://hashnode.com/tag/arrow-functions-in-javascript)
-   [#function-expression-and-declaration](https://hashnode.com/tag/function-expression-and-declaration)

## Written by

[shyamendrahazracodes](https://hashnode.com/@shyamhzdotdev)

@shyamhzdotdev

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

Just a stubborn coder

I write code , that run in the browser and someone else's machine. And sometimes I also write articles

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
