Click in order · JavaScript and TypeScript course · Module 2: Functions, Arrays and Objects
Variable Declaration Order
Sort the variable declaration keywords from the least to the most restrictive:
Items to click
- var (function scope, can be redeclared)
- const (block scope, cannot be reassigned)
- let (block scope, can be reassigned)
Show the answer
Correct order:
- var (function scope, can be redeclared)
- let (block scope, can be reassigned)
- const (block scope, cannot be reassigned)