Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

temporal dead zone #294

Open
wants to merge 1 commit into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions javascript/answers/shubham-soni-q48.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
<html>
<head>

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-157837769-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-157837769-1');
</script>

<title>
JavaScript | InterQues | Coding Ninjas
</title>

<link rel="shortcut icon" type="image/png" href="../../assets/favicon.png"/>

<meta name="description" content="What is an IIFE in Javascript?">
</head>
<body>

<div>
<img src="../../assets/CN_logo.png" height='72px' alt="Coding Ninjas Logo">
</div>

<div>
<p>
<small>

<a href="../../index.html">Home</a>
&gt; <a href="../index.html">JavaScript Questions</a>
&gt; What is "temporal dead zone" in Javascript?

</small>

</p>
</div>


<div>
<div>
<h4>
Q: What is "temporal dead zone" in Javascript?
</h4>

</div>
<br>
<br>
<div>
<strong>Answer:</strong>

<p>
A temporal dead zone (TDZ) is the area of a block where a variable is inaccessible until the moment the computer completely initializes it with a value.

A block is a pair of braces ({...}) used to group multiple statements.
Initialization occurs when you assign an initial value to a variable.
Suppose you attempt to access a variable before its complete initialization. In such a case, JavaScript will throw a ReferenceError.


</p>


</div>
</div>

<hr>

<div>
<h5>
Similar Questions
</h5>
<ul>

</ul>
</div>

</body>
</html>
8 changes: 8 additions & 0 deletions javascript/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,14 @@ <h4>
</h4>
</a>
</li>

<li>
<a href="./answers/shubham-soni-q48.html">
<h4>
What is "temporal dead zone" in JavaScript?
</h4>
</a>
</li>
</ol>

</body>
Expand Down