Question: Please answer this: Given the following code: function big(){ function sub1() { var x=7;} function sub2(){ var y=x;} varx=3 } If the language employed scope
Please answer this:

Given the following code: function big()\{ function sub1() { var x=7;} function sub2(){ var y=x;} varx=3 \} If the language employed scope rules for its variables, then the value of the variable y in sub 2 would be defined by the spacial relationship and would result in the value of . If the language employed scope rules, then the value of the variable y would depend on the order of calls: if sub2 were called from big, then it would be , if sub2 were called from sub1, it would be Answer 1: dynamic Answer 2: 3 Answer 3: static Answer 4: 7 Answer 5: 7
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
