Question: 1) Consider the following skeletal javascript program. //main program var num1,num2; function func1(){ var num1,num2,num3; . . } function func2(){ var num1, num3,num4; . .

1) Consider the following skeletal javascript program.

//main program

var num1,num2;

function func1(){

var num1,num2,num3;

. .

}

function func2(){

var num1, num3,num4;

. .

}

What variables are visible during execution of the last subprogram activated (in the following calling sequences). Please specify each visible variable with the name of the unit where it is declared. Assume dynamic scoping is used. The calling sequences are:

a) Main calls func1; func1 calls func2

b) Main calls func2; func2 calls func1

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!