---
title: "Discussion on \"What is Hoisting In JavaScript?\" | Hashnode"
description: "Discussion on \"What is Hoisting In JavaScript?\". Definition :\nHoisting is a phenomenon in JavaScript by which you can access the variables and functions even before we have initialized them. Yeah, you heard it right... :) it will not throw any error.\nLet us take a simple example\nCan you tell me Wha..."
url: "https://hashnode.com/posts/what-is-hoisting-in-javascript/600ada02a9a6c21e4fa45083"
---

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

Discussion

# [What is Hoisting In JavaScript?](https://shashankorthiwada.hashnode.dev/what-is-hoisting-in-javascript?utm_source=hashnode&utm_medium=feed)

Definition : Hoisting is a phenomenon in JavaScript by which you can access the variables and functions even before we have initialized them. Yeah, you heard it right... :) it will not throw any error. Let us take a simple example Can you tell me Wha...

Jan 22, 2021 · 11 min read · shashankorthiwada.hashnode.dev  
Updated Jan 24, 2021  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#hoisting](https://hashnode.com/tag/hoisting)
-   [#js](https://hashnode.com/tag/js)
-   [#web-development](https://hashnode.com/tag/web-development)

## Written by

[Shashank Korthiwada](https://hashnode.com/@ShashanKorthiwada)

@ShashanKorthiwada · Bangalore/Bengaluru

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

Software Developer

I am a Software Developer Working at 7 Eleven. I write about Javascript, React, Web Development

## Responses 2

Markdown supported · ⌘↵ to post

[Suyash Pradhan](https://hashnode.com/@suyashpradhan)

[Feb 26, 2021](https://hashnode.com/posts/what-is-hoisting-in-javascript/600ada02a9a6c21e4fa45083/comment/603905991d789c61c39cd600)

Good Read!

[Bhargav Ponnapalli](https://hashnode.com/@codewithbhargav)

[Jan 22, 2021](https://hashnode.com/posts/what-is-hoisting-in-javascript/600ada02a9a6c21e4fa45083/comment/600af8d3a9a6c21e4fa452d7)

Good one [Shashank Korthiwada](https://hashnode.com/@ShashanKorthiwada).

An interesting addition to this article would be to talk about using `let` vs `var` for variable declaration and how they are different in hoisting, perhaps?

Thanks!

[Shashank Korthiwada](https://hashnode.com/@ShashanKorthiwada)

[Jan 22, 2021](https://hashnode.com/posts/what-is-hoisting-in-javascript/600ada02a9a6c21e4fa45083/comment/600af8d3a9a6c21e4fa452d7#reply-600afc958304951e7434e20b)

Thanks [Bhargav Ponnapalli](https://hashnode.com/@imbhargav5)

Sure will definitely add those :)...

Thanks for Suggesting...
