Question · JavaScript and TypeScript course · Module 2: Functions, Arrays and Objects

Variable Scope

Which keywords create block-scoped variables?

Answer options

  • var
  • let and const
  • only let
  • only const
Show the answer

Correct answer:

  • let and const