YUNOVA · JavaScript · Module 5: Functions
JavaScript mein hoisting kya hoti hai
JavaScript mein hoisting kya hoti hai
Key points
- hoisting में declarations code चलने से पहले अपने scope के ऊपर मान ली जाती हैं।
- var पहले पढ़ने पर undefined देता है; let और const ReferenceError देते हैं।
- let और const की declaration से पहले वाली जगह को temporal dead zone कहते हैं।