---
title: "Discussion on \"Hoisting in JavaScript\" | Hashnode"
description: "Discussion on \"Hoisting in JavaScript\". In JavaScript hoisting refers to the process by which the variable and function are moved to the top of their respective scope. This behavior is applied to both global and local scopes.\nHere are some examples to illustrate hoisting\nExample 1: Variabl..."
url: "https://hashnode.com/posts/hoisting-in-javascript/65d8703ac99ba668511afea0"
---

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

Discussion

# [Hoisting in JavaScript](https://shivamgupta6418.hashnode.dev/hoisting-in-javascript?utm_source=hashnode&utm_medium=feed)

In JavaScript hoisting refers to the process by which the variable and function are moved to the top of their respective scope. This behavior is applied to both global and local scopes. Here are some examples to illustrate hoisting Example 1: Variabl...

Feb 23, 2024 · 2 min read · shivamgupta6418.hashnode.dev  
Updated Mar 25, 2024  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#javascript-framework](https://hashnode.com/tag/javascript-framework)
-   [#javascript-library](https://hashnode.com/tag/javascript-library)
-   [#web-development](https://hashnode.com/tag/web-development)
-   [#webdev](https://hashnode.com/tag/webdev)
-   [#wemakedevs](https://hashnode.com/tag/wemakedevs)
-   [#web-developers](https://hashnode.com/tag/web-developers)
-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#what-is-hoisting-in-javascript](https://hashnode.com/tag/what-is-hoisting-in-javascript)

## Written by

[Shivam Gupta](https://hashnode.com/@Shivamgupta6418)

@Shivamgupta6418

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

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
