---
title: "Discussion on \"Understanding Hoisting in Javascript\" | Hashnode"
description: "Discussion on \"Understanding Hoisting in Javascript\". If you are new to Javascript, you might have come across the term Hoisting being talked about a lot. But what exactly is hoisting? \nLet's find out with the help of some examples.\nConsider the following scenarios:\nconsole.log(a)\nconsole.log(b)\nvar b =..."
url: "https://hashnode.com/posts/understanding-hoisting-in-javascript/610d5193528eff11aea8819d"
---

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

Discussion

# [Understanding Hoisting in Javascript](https://preetiroshan.hashnode.dev/understanding-hoisting-in-javascript?utm_source=hashnode&utm_medium=feed)

If you are new to Javascript, you might have come across the term Hoisting being talked about a lot. But what exactly is hoisting? Let's find out with the help of some examples. Consider the following scenarios: console.log(a) console.log(b) var b =...

Aug 6, 2021 · 2 min read · preetiroshan.hashnode.dev  
Updated Aug 18, 2021  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#hoisting](https://hashnode.com/tag/hoisting)
-   [#variables](https://hashnode.com/tag/variables)
-   [#functions](https://hashnode.com/tag/functions)

## Written by

[Preeti Roshan](https://hashnode.com/@preetiroshan)

@preetiroshan

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

Software Developer at Paytm

Talks about Javascript and ReactJs

## Responses 1

Markdown supported · ⌘↵ to post

[Rajan Srivastav](https://hashnode.com/@RajanSrivastav)

[Aug 6, 2021](https://hashnode.com/posts/understanding-hoisting-in-javascript/610d5193528eff11aea8819d/comment/610d5a6e528eff11aea883b7)

Nicely explained. Thanks
