From bdde58c2f528da37d943c87eb922e625be9eb1ed Mon Sep 17 00:00:00 2001 From: shubhamSRepository Date: Wed, 19 Oct 2022 03:10:31 +0530 Subject: [PATCH] temporal dead zone --- javascript/answers/shubham-soni-q48.html | 79 ++++++++++++++++++++++++ javascript/index.html | 8 +++ 2 files changed, 87 insertions(+) create mode 100644 javascript/answers/shubham-soni-q48.html diff --git a/javascript/answers/shubham-soni-q48.html b/javascript/answers/shubham-soni-q48.html new file mode 100644 index 0000000..fb19bee --- /dev/null +++ b/javascript/answers/shubham-soni-q48.html @@ -0,0 +1,79 @@ + + + + + + + + + JavaScript | InterQues | Coding Ninjas + + + + + + + + +
+ Coding Ninjas Logo +
+ +
+

+ + + Home + > JavaScript Questions + > What is "temporal dead zone" in Javascript? + + + +

+
+ + +
+
+

+ Q: What is "temporal dead zone" in Javascript? +

+ +
+
+
+
+ Answer: + +

+ 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. + + +

+ + +
+
+ +
+ +
+
+ Similar Questions +
+ +
+ + + diff --git a/javascript/index.html b/javascript/index.html index 2dcfb31..b6986d4 100644 --- a/javascript/index.html +++ b/javascript/index.html @@ -503,6 +503,14 @@

+ +
  • + +

    + What is "temporal dead zone" in JavaScript? +

    +
    +