---
title: "Discussion on \"Var, Let, Const and TDZ\" | Hashnode"
description: "Discussion on \"Var, Let, Const and TDZ\". Var, Let and Const\nBefore es6 only var was used to declare variables in JS, but with es6 came let and const. There were many problems related to var and thus it was necessary to have a new way of variable declaration.\nVar\n\nvar can be scoped globally ..."
url: "https://hashnode.com/posts/var-let-const-and-tdz/61e5470b00c806252387b570"
---

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

Discussion

# [Var, Let, Const and TDZ](https://aniketparihar.hashnode.dev/var-let-const-and-tdz?utm_source=hashnode&utm_medium=feed)

Var, Let and Const Before es6 only var was used to declare variables in JS, but with es6 came let and const. There were many problems related to var and thus it was necessary to have a new way of variable declaration. Var var can be scoped globally ...

Jan 17, 2022 · 4 min read · aniketparihar.hashnode.dev  
Read the article

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

## Written by

[Aniket Parihar](https://hashnode.com/@aniketxparihar)

@aniketxparihar · India

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

SDE @ Blinkit

Developer from 🇮🇳.

## Responses 1

Markdown supported · ⌘↵ to post

[John Palmgren](https://hashnode.com/@JohnPalmgren)

[Jan 17, 2022](https://hashnode.com/posts/var-let-const-and-tdz/61e5470b00c806252387b570/comment/61e54d8c00c806252387b663)

Nice article. Very comprehensive. I hadn't heard the acronym TDZ before

[Aniket Parihar](https://hashnode.com/@aniketxparihar)

[Jan 17, 2022](https://hashnode.com/posts/var-let-const-and-tdz/61e5470b00c806252387b570/comment/61e54d8c00c806252387b663#reply-61e5582000c806252387b7de)

Glad you found it useful [John Palmgren](https://hashnode.com/@JohnPalmgren) !
