---
title: "Discussion on \"\" Hoisting \" in JavaScript.\" | Hashnode"
description: "Discussion on \"\" Hoisting \" in JavaScript.\". Let's see an example first:\nvar x ;\nx = 50;\nconsole.log(x);\n\n// Output: 50\nAnother Example :\nx = 50;\nconsole.log(x);\nvar x ;\n\n// Output: 50\nWhy in both the case output is 50. For this, you will have to understand Hoisting.\nWhat do you understand by H..."
url: "https://hashnode.com/posts/hoisting-in-javascript/610b989dd30f755008016d71"
---

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

Discussion

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

Let's see an example first: var x ; x = 50; console.log(x); // Output: 50 Another Example : x = 50; console.log(x); var x ; // Output: 50 Why in both the case output is 50. For this, you will have to understand Hoisting. What do you understand by H...

Aug 5, 2021 · 3 min read · vanshsharma.hashnode.dev  
Read the article

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

## Written by

[Vansh Sharma](https://hashnode.com/@vanshsharma)

@vanshsharma · India

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

Frontend Engineer || Educative Author

Hello, I'm a Frontend engineer with a passion for learning new tech, writing blogs, and sharing my knowledge with others. Apart from coding, I love staying up-to-date with the latest trends and tools in the tech industry. I'm always learning and exploring new technologies and techniques to improve my work and create more efficient and scalable solutions. I enjoy sharing my knowledge with others through writing blogs and creating courses. Recently, I created a course for Educative on React. As a freelancer, I'm seeking projects related to Shopify and React. I enjoy working on projects that challenge me and help me grow as a developer.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
