
Block Scope
JavaScript also uses block scope. When we say block, we are referring to a code block. A code block is contained within curly braces. Information is encapsulated to the curly braces within the block of code. Here is an example… Since the variable name is within the curly braces, or