1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Nimfa-mama [501]
3 years ago
8

Consider the following JavaScript program:

Computers and Technology
1 answer:
dem82 [27]3 years ago
7 0

Answer:

Variable       Where Declared

In Sub1 :

        A        Sub1

        Y        Sub1

        Z        Sub1

        X        Main

In Sub2:

        A        Sub2

        B        Sub2

        Z        Sub2

        Y        Sub1

        X        Main

In Sub3 :

        A        Sub3

        X        Sub3

        W       Sub3

        Y        Main

        Z        Main

Explanation:

In static-scoped languages with nested subprograms, the declaration of a variable is checked with the subprogram, if it is not found, it check within the parent method that called it, it continue until it find a declaration, if no declaration is found, it display an error.

In Sub1, a, y, z is declared there while the declaration of x is found in main.

In Sub2, a, b, z is declared, declaration of y is found in sub1 and declaration of x is found in main.

In Sub3, a, x, w is declared while the declaration of y, z is from the main.

You might be interested in
Three variables, x, y and z, supposedly hold strings of digits, suitable for converting to integers. Write code that converts th
sineoko [7]

Answer:

Required code is given below:

Explanation:

x, y, z = "abc", "15", "boo"

errors = []

try:

   x = int(x)

except ValueError:

   errors.append('x')

try:

   y = int(y)

except ValueError:

   errors.append('y')

try:

   z = int(z)

except ValueError:

   errors.append('z')

if len(errors) == 0:

   print(x+y+z)

else:

   print('bad value(s) in: ' + ' '.join(errors))

5 0
3 years ago
Explain the history of computing device of mechanical era
gayaneshka [121]

Answer:

The mechanical age can be defined as the time between 1450 and 1840. A lot of new technologies were developed in this era due to an explosion of interest in computation and information. Technologies like the slide ruler (an analog computer used for multiplying and dividing) were invented in this period.

5 0
2 years ago
What can a dimm use to hold data and amplify a signal just before the data is written to the module?
ioda
DIMM stands for Dual In-line Memory Module) .It is a module that contains one or several random access memory (RAM) chips on a small circuit board.
DIMM uses registers to hold data and amplify a signal just before the data is written to the module.<span>Today's DIMMs use a 64-bit data path.</span>
6 0
3 years ago
Hello pls answer<br><br><br>what is the use of loop in java​
xxMikexx [17]
The use of loop in java is to run a block of code for a certain number of times.
7 0
2 years ago
Which of the following is another term for a subfolder​
marin [14]

Answer:

below

Explanation:

subdirectory

5 0
3 years ago
Other questions:
  • Clip art, by default, is formatted as a(n) ____, which cannot be moved to a precise location on a page.
    14·1 answer
  • ----------HELP WITH 3 QUESTIONS FOR 30 POINTS!!!---------
    6·1 answer
  • What is the decimal equivalent of the binary number 1102?
    8·2 answers
  • What is the process of copying items from ram to a storage device?
    8·1 answer
  • Help me out here pleaseeeee
    9·2 answers
  • Why do we need IP Addresses in order for the Internet to function properly?
    7·1 answer
  • What is the default font style of “Title” box in MS PowerPoint 2013?
    8·1 answer
  • Which of the following data structures can erase from its beginning or its end in O(1) time?
    15·1 answer
  • Read the attached paper titled A Survey of Coarse-Grained Reconfigurable Architecture and comment on it. Make sure to specifical
    5·1 answer
  • The microprogram counter (MPC) contains the address of the next microcode statement for the Mic1 emulator to execute. The MPC va
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!