Pergunta de entrevista da empresa Securin

Explain the difference between let, const, and var in JavaScript.

Resposta da entrevista

Sigiloso

22 de jun. de 2026

I explained that var is function-scoped and can be redeclared, while let and const are block-scoped. let allows reassignment, whereas const cannot be reassigned after initialization. I also mentioned hoisting behavior and the temporal dead zone for let and const.