Question: 1. Consider the following JavaScript program: var x, y, z function sub10 { var a, y, z; function sub20 { var a, b, z; //
1. Consider the following JavaScript program: var x, y, z function sub10 { var a, y, z; function sub20 { var a, b, z; // BODY OF SUB2 } // end sub2 010 020 030 040 050 060 070 080 090 100 110 120 130 140 150 160 170 180 // BODY OF SUB1 } // end sub1 function sub30 { var a, x, W; // BODY OF SUB3 } // end sub3 a) List all variables visible at BODY OF SUBI (line 110) along with the line numbers where they are declared, assuming static scoping is used. b) List all variables visible at BODY OF SUB2 (line 080) along with the line numbers where they are declared, assuming static scoping is used. c) List all variables visible at BODY OF SUB3 (line 170) along with the line numbers where they are declared, assuming static scoping is used
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
