Question: Modify the outputBox ( ) function and remove the var from the box variable definition and test ( be sure to examine the console )
Modify the outputBox function and remove the var from the box variable definition and test be sure to examine the console Notice that defining a variable without a var gives that variable global scope. Mistakenly introducing or overriding global variables in this way is a common source of bugs. Thus you should always explicitly declare variables with the var keyword.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
