Home

FlashMaster

JavaScript Basics

Card 1 of 5 0%
Question

What is the difference between 'let' and 'var'?

Tap to Flip
Answer

'let' is block-scoped, while 'var' is function-scoped. 'let' also cannot be redeclared in the same scope, preventing common bugs.