What is a code block?
What are some examples of a code block?
It is usually denoted by a set of curly braces.
If it has statements = code block
If it has key-value = object
What does block scope mean?
It means the variables declared within the block can’t be accessed outside of the block.
What is the scope of a variable declared with const or let?
What is the scope of a variable declared with var?
block scope
which means the variable only lives inside the block
global or function scope (depending on where the variable was declared using var)
What is the difference between let and const?