- Executores
-
Aprender
Aprender Python Exemplos executáveis, NumPy, pandas e mais Aprender IA / Machine LearningRedes neurais, ML e LLMs do zero Aprender C e C++ Ponteiros, memória, STL e C++ moderno Aprender C#Fundamentos, POO, LINQ, async e exercícios .NET Aprender MatplotlibGráficos de linha, barras, dispersão e pizza com visualizadores Aprender RustOwnership, traits, tratamento de erros e threads Aprender GoSlices, interfaces, goroutines e channels Algoritmos em Python Busca, ordenação, recursão e visualizações O(n) Algoritmos em C e C++ Compare implementações em C e C++ Programação para crianças Aprenda a programar brincando!
- QuizzesNovo
- DesafiosNovo
- Para professoresNovo
- Atualizações
- Me pague um café
Quiz de 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.
Pergunta de exemplo
Pergunta 1 de 10What does this print?
console.log(a);
var a = 5;
Mostrar a resposta
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.
O que este quiz cobre
- 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
Perguntas frequentes
Preciso de uma conta?
Não. Qualquer pessoa pode jogar. Entre para guardar seu XP, sequência, badges e histórico.
Posso refazer?
Pode. Sua melhor nota fica salva, e as perguntas e respostas são embaralhadas a cada vez.