Add to Chrome
✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
What is preferable: defining variables in the global scope or defining variables in the block scope?
Defining variables in the block scope. Variables defined at the block level can still be used at the global level.
Defining variables in the block scope. Variables defined in the global scope can cause unexpected behavior in our code.
Defining variables in the global scope and the block scope are equally preferable.
Defining variables in the global scope. Variables defined in the block scope are restrictive and often conflict with variables defined in the global scope.
Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!