---
title: "Discussion on \"Complete Guide on Temporal Dead Zone of \n                                                    JavaScript\" | Hashnode"
description: "Discussion on \"Complete Guide on Temporal Dead Zone of \n                                                    JavaScript\". By reading you can completely understand temporal dead zone of \n                                                         javascript"
url: "https://hashnode.com/posts/complete-guide-on-temporal-dead-zone-of-javascript/6315d9e0d54563f8b19af3e8"
---

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

Discussion

# [Complete Guide on Temporal Dead Zone of JavaScript](https://chhakulizingare.hashnode.dev/complete-guide-on-temporal-dead-zone-of-javascript?utm_source=hashnode&utm_medium=feed)

By reading you can completely understand temporal dead zone of javascript

Sep 5, 2022 · 5 min read · chhakulizingare.hashnode.dev  
Read the article

-   [#iwritecode](https://hashnode.com/tag/iwritecode)
-   [#learncodeonline](https://hashnode.com/tag/learncodeonline)
-   [#hiteshchoudharylco](https://hashnode.com/tag/hiteshchoudharylco)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#temporal-dead-zone](https://hashnode.com/tag/temporal-dead-zone)

## Written by

[Chhakuli Zingare](https://hashnode.com/@chhakuli)

@chhakuli · India

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

Software Engineer At Oraczen

Frontend Dev 🚀 | JavaScript ♥ | ReactJs ♥ | Next JS | Featured Technical Writer✍️

## Responses 1

Markdown supported · ⌘↵ to post

[Manideep Paul](https://hashnode.com/@ManideepPaul)

[Sep 16, 2022](https://hashnode.com/posts/complete-guide-on-temporal-dead-zone-of-javascript/6315d9e0d54563f8b19af3e8/comment/632459c3dd55cd8b89b1c289)

According to my understanding, the `let` and `const` are hoisted and initialized with `undefined`, but you can't access them because they aren't attached to the global object (window).

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1663326464969/ANVV8QvMM.png)

**By the way, excellent article. This was greatly useful to me.**

[Chhakuli Zingare](https://hashnode.com/@chhakuli)

[Sep 16, 2022](https://hashnode.com/posts/complete-guide-on-temporal-dead-zone-of-javascript/6315d9e0d54563f8b19af3e8/comment/632459c3dd55cd8b89b1c289#reply-63246933bc15ea8efdf5d542)

See hear in the image you have declared the a variable with "var" That's why it's giving you undefined.. But in case of const and let hoisting is different that's why they lies in tdz.

[Wojtek X](https://hashnode.com/@wojtekxtx)

[Sep 16, 2022](https://hashnode.com/posts/complete-guide-on-temporal-dead-zone-of-javascript/6315d9e0d54563f8b19af3e8/comment/632459c3dd55cd8b89b1c289#reply-63246f27bc15ea8efdf5d6f1)

[Chhakuli Zingare](https://hashnode.com/@chhakuli)

> hear

here...........

[Manideep Paul](https://hashnode.com/@ManideepPaul)

[Sep 16, 2022](https://hashnode.com/posts/complete-guide-on-temporal-dead-zone-of-javascript/6315d9e0d54563f8b19af3e8/comment/632459c3dd55cd8b89b1c289#reply-63247031dd55cd8b89b1c760)

[Chhakuli Zingare](https://hashnode.com/@chhakuli) Variable "b" is declared with "let"
