DEV Community

Cover image for Block Scope and Shadowing In JavaScript

Block Scope and Shadowing In JavaScript

Shahid Bugti on January 11, 2024

To understand Block Scope first we must know that what a block Is. What exactly a Block is? A block is pair of curly braces “{ }”, it is also call...
Collapse
 
onlinemsr profile image
Raja MSR

In JavaScript, we should avoid declaring variable with var keyword.

Collapse
 
shahidbugti profile image
Shahid Bugti

yes absolutely I used it just to clear concepts