Question: Consider the following JavaScript program function sub1 () {var x function sub2 () {// creates a popup box with the value of x alert(x);}; function

 Consider the following JavaScript program function sub1 () {var x function

Consider the following JavaScript program function sub1 () {var x function sub2 () {// creates a popup box with the value of x alert(x);}; function sub3 () var x; x = 3; sub4(sub2);}; function sub4(subx) var x; x = 4; subx ();}; x = 1; sub3();} |sub1 (); Give the output of this program when executed using (a) deep, (b) shallow, and (c) ad-hoc binding

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!