Quiz · Scope · lesson 2 of 8Quiz — var, let and constWhat are the differences between var, let, and const?[A]var belongs to the whole function and ignores the {} blocks inside it, while let and const exist only inside their block. const only forbids declaring the same name twice; assigning a new value later is allowed.[B]let and const belong to the whole function and ignore the {} blocks inside it, while var exists only inside the block where it is declared. Unlike let, const must be declared at the top of the function.[C]var belongs to the whole function and ignores the {} blocks inside it, while let and const exist only inside the block where they are declared. const also forbids assigning a new value to the variable later.[D]All three exist only inside the {} block where they are declared, so var and let behave exactly the same way. The one real difference is that const is created before the first line of the program runs.Subscribe to take the courseThe course is free. Sign in with Telegram and subscribe to the channel to open every lesson.Continue with TelegramSign in another way← BackBlock scopeNext →Hoisting and the TDZ