- Esecutori
-
Impara
Impara Python Esempi eseguibili, NumPy, pandas e altro Impara l'IA / Machine LearningReti neurali, ML e LLM da zero Impara C e C++ Puntatori, memoria, STL e C++ moderno Impara C#Fondamenti, OOP, LINQ, async ed esercizi .NET Impara MatplotlibGrafici a linee, barre, dispersione e torta con visualizzatori Impara RustOwnership, trait, gestione degli errori e thread Impara GoSlice, interfacce, goroutine e canali Algoritmi Python Ricerca, ordinamento, ricorsione e visualizzazioni O(n) Algoritmi C e C++ Confronta le implementazioni in C e C++ Programmazione per bambini Impara a programmare giocando!
- QuizNuovo
- SfideNuovo
- Per docentiNuovo
- Aggiornamenti
- Offrimi un caffè
Quiz di JavaScript: Scope & Hoisting
This JavaScript quiz covers scope and hoisting, including the temporal dead zone (TDZ). You will predict how var, let, const and functions behave before their line runs, and how inner scopes shadow outer ones.
Domanda di esempio
Domanda 1 di 10What does this print?
console.log(a);
var a = 5;
Mostra la risposta
B. undefined var a is hoisted to the top of its scope and starts as undefined; only the assignment a = 5 stays on its line. So the log runs before the value is set.
Cosa copre questo quiz
- Hoisting of
var: declared early,undefineduntil assigned - The temporal dead zone for
letandconst - Function declarations vs function expressions
- Block scope, function scope and shadowing
- Why
typeofdoes not help inside the TDZ
Domande frequenti
Serve un account?
No. Chiunque può giocare. Accedi per salvare XP, serie, badge e cronologia.
Posso rifarlo?
Sì. Il tuo miglior punteggio resta salvato, e domande e risposte vengono mescolate ogni volta.