---
title: "Discussion on \"Understanding Hoisting , lexical environment and block scope in JavaScript with Var , let and const variables\" | Hashnode"
description: "Discussion on \"Understanding Hoisting , lexical environment and block scope in JavaScript with Var , let and const variables\". Hey Everyone, if you have been working with JS for a while, you would wonder how things behave differently in JS compared to other programming languages. How can we access a variable or a function before its declaration?  What are the scope chain and..."
url: "https://hashnode.com/posts/understanding-hoisting-lexical-environment-and-block-scope-in-javascript-with-var-let-and-const-variables/6099268621068818a5c6406f"
---

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

Discussion

# [Understanding Hoisting , lexical environment and block scope in JavaScript with Var , let and const variables](https://deepkiran.hashnode.dev/understanding-hoisting-lexical-environment-and-block-scope-in-javascript-with-var-let-and-const-variables?utm_source=hashnode&utm_medium=feed)

Hey Everyone, if you have been working with JS for a while, you would wonder how things behave differently in JS compared to other programming languages. How can we access a variable or a function before its declaration? What are the scope chain and...

May 10, 2021 · 8 min read · deepkiran.hashnode.dev  
Read the article

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

## Written by

[Deep Kiran](https://hashnode.com/@DeepKiran)

@DeepKiran

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

I love to develop web apps

## Responses 1

Markdown supported · ⌘↵ to post

[Smile Gupta](https://hashnode.com/@smilegupta)

[May 12, 2021](https://hashnode.com/posts/understanding-hoisting-lexical-environment-and-block-scope-in-javascript-with-var-let-and-const-variables/6099268621068818a5c6406f/comment/609bb00300bbde79d86a60c1)

Amazing article deep

[Deep Kiran](https://hashnode.com/@DeepKiran)

[May 13, 2021](https://hashnode.com/posts/understanding-hoisting-lexical-environment-and-block-scope-in-javascript-with-var-let-and-const-variables/6099268621068818a5c6406f/comment/609bb00300bbde79d86a60c1#reply-609d454db684eb4cd52c43a7)

Thank you Smile !
