Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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: 7Step 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