Scope is a context in which our variables are declared. We think about scope in relation to blocks because variables can be defined either inside or outside of the block. In global scope variables are declared outside any block so that they can be accessible to all the blocks.
Example:
let color ="blue";functionfavColor() {console.log(`My favourite color is ${color}.`);}favColor();// Output: My favorite color is blue.