This is an example of block scope. When you declare a variable inside a block of code, it exists from the point of its declaration until the closing ‘}’ of the block.
This is an example of block scope. When you declare a variable inside a block of code, it exists from the point of its declaration until the closing ‘}’ of the block.