Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started