JavaScript Interview Question - What is Hoisting and Temporal Dead Zone (TDZ) ?

Ғылым және технология

Hoisting and Temporal Dead Zone (TDZ) ?
Hoisting:
Hoisting is a behavior in JavaScript where variable and function declarations are moved to the top of their containing scope during the compilation phase, before the code is actually executed. This means that you can use variables and functions in your code even before they are declared. Mainly we have Variable Hoisting and Function Hoisting.
Also we have discussed about hoisting limitations as well.
Temporal Dead Zone (TDZ) :
The Temporal Dead Zone (TDZ) in JavaScript refers to the period between entering scope and the actual declaration of a variable or function. During this time, trying to access the variable or function will result in a ReferenceError. The TDZ concept specifically applies to variables declared with let and const.
KZread Channel -
-----------------------------------------------------------------------------------------------------------------------
/ @kyprogramming
-----------------------------------------------------------------------------------------------------------------------
FACEBOOK -
/ kyprogramming
TWITTER -
/ kyprogramming
INSTAGRAM-
/ kkyadavtech
Github Code:
-----------------------------------------------------------------------------------------------------------------------
github.com/kyprogramming/web-...
► JAVASCRIPT :
JavaScript - Interview Questions Answer Series - Introduction • JavaScript- Interview...
JavaScript - Interview Question - What is Difference between Map and WeakMap Object? • JavaScript - Interview...
JavaScript Interview Question - What is Design Pattern ? [ Singleton Factory & Observer ] • JavaScript Interview Q...
JavaScript Interview Question - What is Hoisting and Temporal Dead Zone (TDZ) ? • JavaScript Interview Q...
JavaScript Interview Question - What is Type Coercion ? • JavaScript Interview Q...
JavaScript Interview Question - What is difference between Spread and Rest Operator? • JavaScript Interview Q...
JavaScript Interview Question - What is difference between Shallow Copy and Deep Copy? • JavaScript Interview Q...
► FULL STACK DEVELOPER :
Full Stack Developer - Introduction - Road Map • Full Stack Developer ...
► UNIT TESTING - MOCHA CHAI :
#1- Introduction | Unit Testing | Mocha Chai in TypeScript Node • #1- Introduction | Un...
#2- Configuration and Installation | Unit Testing | Mocha Chai in TypeScript Node • #2- Configuration and ...
#3- Chai Assertion Style-(Should Expect Assert) | Common Chai Assertion | Mocha Chai TypeScript Node • #3- Chai Assertion Sty...
#4- Hooks | Nested Test Suite | Skip/Only | Mocha Chai Testing in TypeScript & Node • #4- Hooks | Nested Te...
#5- Syp Stub Mock using Sinon | Mocha Chai Unit Testing in TypeScript & Node Js • #5- Syp Stub Mock usin...
#6- Testing Asynchronous functions and Promise | Mocha Chai Unit Testing in TypeScript & Node Js • #6- Testing Asynchrono...
#7- Uesting for GET POST API using NOCK | Mocha Chai Unit Testing in TypeScript & Node Js • #7- Uesting for GET PO...
#8- Code coverage and Reporting using nyc tool | Mocha Chai Unit Testing in TypeScript & Node Js • #8- Code coverage and ...
► NODE JS - COMPLETE PROJECT :
Complete - Unit Testing -Mocha Chai in Node Typescript - 2 Hrs • Complete - Unit Testi...
Part 1 NodeJs Express TypeScript Mongo DB -Complete Project - Library Management - Step by Step • Part -1- NodeJs Expres...
Part 2 NodeJs Express TypeScript Mongo DB -Complete Project - Library Management - Step by Step • Part -2- NodeJs Expres...
Part 3 NodeJs Express TypeScript Mongo DB -Complete Project - Library Management - Step by Step • Part -3- NodeJs Expres...
Part 4 NodeJs Express TypeScript Mongo DB -Complete Project - Library Management - Step by Step • Part -4- NodeJs Expres...
Step by Step - Complete Project - NodeJs Express TypeScript Mongo DB Library Management - 05 Hrs • Step by Step - Comple...
► ANGULAR :
Angular Interview Questions - Difference between JIT and AOT Compiler • Angular Interview Ques...
Angular Interview Questions - Promise Vs Observable - With Practical Demo • Angular Interview Ques...
Angular Web Component Standalone - Single JavaScript File - Step By Step • Angular Web Component ...
Angular Interview Question - Unit Testing - Step by Step - Part 1 • Angular Interview Ques...
Angular Interview Question - Unit Testing - Part 2 • Angular Interview Ques...
Angular Interview Question - Unit Testing - Complete • Angular Interview Ques...
Please SUBSCRIBE my channel and do not forgot to press the bell icon in order to get notification for all of my upcoming videos as well as please like and share.

Пікірлер: 5

  • @PreCodeCamp
    @PreCodeCamp3 ай бұрын

    Useful tips thanks for sharing. Scope and hoisting are always hard concepts to understand. You went nice and slow.

  • @vrb199
    @vrb1997 ай бұрын

    Very useful thanks for sharing ❤

  • @kyprogramming

    @kyprogramming

    7 ай бұрын

    Thank you Veeresh🙏

Келесі