---
title: "Comment by Manideep Paul on \"Complete Guide on Temporal Dead Zone of \n                                                    JavaScript\" | Hashnode"
description: "According to my understanding, the let and const are hoisted and initialized with undefined , but you can&#39;t access them because they aren&#39;t attached to"
url: "https://hashnode.com/posts/complete-guide-on-temporal-dead-zone-of-javascript/6315d9e0d54563f8b19af3e8/comment/632459c3dd55cd8b89b1c289"
---

[Discussion](https://hashnode.com/posts/complete-guide-on-temporal-dead-zone-of-javascript/6315d9e0d54563f8b19af3e8)

Comment [Complete Guide on Temporal Dead Zone of JavaScript](https://hashnode.com/posts/complete-guide-on-temporal-dead-zone-of-javascript/6315d9e0d54563f8b19af3e8)

[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"
