---
title: "Discussion on \"Understanding function declaration vs expression in JavaScript\" | Hashnode"
description: "Discussion on \"Understanding function declaration vs expression in JavaScript\". When I started learning javascript for the first time, it took me a long time to grasp some concepts. In fact, at a point nothing made sense to me, because having learn't html and css first before diving into JavaScript I felt programming was easy :(..."
url: "https://hashnode.com/posts/understanding-function-declaration-vs-expression-in-javascript/5f37c8010801bf3f76e5f413"
---

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

Discussion

# [Understanding function declaration vs expression in JavaScript](https://codewithkisha.hashnode.dev/understanding-function-declaration-vs-expression-in-javascript?utm_source=hashnode&utm_medium=feed)

When I started learning javascript for the first time, it took me a long time to grasp some concepts. In fact, at a point nothing made sense to me, because having learn't html and css first before diving into JavaScript I felt programming was easy :(...

Aug 15, 2020 · 4 min read · codewithkisha.hashnode.dev  
Read the article

## Written by

[Kisha](https://hashnode.com/@Codewithkisha)

@Codewithkisha

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

Frontend developer

## Responses 5

Markdown supported · ⌘↵ to post

[Bamidele Barakat Temitope](https://hashnode.com/@Bamideleaduke)

[Aug 16, 2020](https://hashnode.com/posts/understanding-function-declaration-vs-expression-in-javascript/5f37c8010801bf3f76e5f413/comment/5f395e07c4d5973f55c9106f)

I found this really helpful as a javascript beginner.

Thanks for this piece ma'am

[Kisha](https://hashnode.com/@Codewithkisha)

[Aug 17, 2020](https://hashnode.com/posts/understanding-function-declaration-vs-expression-in-javascript/5f37c8010801bf3f76e5f413/comment/5f395e07c4d5973f55c9106f#reply-5f3a3f84c4d5973f55c9195e)

I'm glad it was helpful

[Deleplentie](https://hashnode.com/@Deleplentie)

[Aug 15, 2020](https://hashnode.com/posts/understanding-function-declaration-vs-expression-in-javascript/5f37c8010801bf3f76e5f413/comment/5f3860cd0801bf3f76e5f8cd)

Interesting article

[Kisha](https://hashnode.com/@Codewithkisha)

[Aug 17, 2020](https://hashnode.com/posts/understanding-function-declaration-vs-expression-in-javascript/5f37c8010801bf3f76e5f413/comment/5f3860cd0801bf3f76e5f8cd#reply-5f3a3f92c4d5973f55c91962)

Thank you!

[Aduonye Iwarimie](https://hashnode.com/@Aduonye)

[Aug 15, 2020](https://hashnode.com/posts/understanding-function-declaration-vs-expression-in-javascript/5f37c8010801bf3f76e5f413/comment/5f37eb330801bf3f76e5f58f)

Beautiful explanation and straight to the point.

Your writing style is good.

I learnt that function declaration can be Hoisted.

While function expression is good for Immediately Invoked Function Expression and using it also prevents polluting the global scope.

Thanks so much for writing about these subtle differences.

[Kisha](https://hashnode.com/@Codewithkisha)

[Aug 15, 2020](https://hashnode.com/posts/understanding-function-declaration-vs-expression-in-javascript/5f37c8010801bf3f76e5f413/comment/5f37eb330801bf3f76e5f58f#reply-5f37eddac4d5973f55c90835)

Thank you so much...I'm glad you learnt something

[Olamide](https://hashnode.com/@Olamidev)

[Aug 15, 2020](https://hashnode.com/posts/understanding-function-declaration-vs-expression-in-javascript/5f37c8010801bf3f76e5f413/comment/5f37ce6d0801bf3f76e5f46c)

💯

[Kisha](https://hashnode.com/@Codewithkisha)

[Aug 15, 2020](https://hashnode.com/posts/understanding-function-declaration-vs-expression-in-javascript/5f37c8010801bf3f76e5f413/comment/5f37ce6d0801bf3f76e5f46c#reply-5f37edef0801bf3f76e5f5db)

thanks!
