ES6 Flashcards
What is a code block? What are some examples of a code block?
A code block is a where we can write code, some examples are a conditional code block, and a loop code block
What does block scope mean?
Block scope describes the accessibility of variables inside of a code block.
What is the scope of a variable declared with const or let?
The code block in which it is declared.
Why is it possible to .push() a new value into a const variable that points to an Array?
because an array is mutable
How should you decide on which type of declaration to use?
If a variable does not change, use const, otherwise use let
What is the syntax for writing a template literal?
backticks
What is “string interpolation”?
the idea that a template literal can be mutated using JavaScript expressoins