Question: For the following JavaScript skeletal program, assume main calls fun1, fun1 calls fun3 (in line 2) and fun3 calls fun2; //the main program var v,

 For the following JavaScript skeletal program, assume main calls fun1, fun1

For the following JavaScript skeletal program, assume main calls fun1, fun1 calls fun3 (in line 2) and fun3 calls fun2; //the main program var v, y; function funl) var x, Z; function fun2){ var z ..//Line 1 ...//Line 2 function fun3 () var y //Line 3 a. List all variables, along with the functions in which they are declared, that are visible at Line 1 in the program. b . Repeat part (a), but list the variables that are visible at Line 2. c. Repeat part (a), but list the variables that are visible at Line 3. d. Assume that dynamic scoping is used, and main calls funl, funl calls fun3 (in line 2) and fun3 calls fun2; List all variables, along with the functions in which they are declared, that are visible at Line 1 in the program. Here's an ex ample of the format that you should use for your answ ers: v (global), z (declared in funl), y (declared in fun 2)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!