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
Courteous behavior on the road will
Novay_Z [31]
Protect you and others from death and injuries
5 0
3 years ago
Read 2 more answers
Look at the following function prototype. double mynewFunction(int); What is the data type of the function’s return variable?
nadezda [96]
The answer is A) Double.

The return type is specified before the method's signature, and the signature is composed of the the method's name and parameters.

In this case, the method is named mynewFunction, takes in an integer as a parameter, and returns a double.

Also, fun fact which is kind of unrelated: if two or more methods have the same name, they can have different functionality as long as their signature is different (different parameter types).
3 0
3 years ago
If it can be applied, the least-damaging recovery option is ________.
Fed [463]
The answer is D, I believe.

6 0
3 years ago
The two mathematical models of language description are generation and recognition. Describe how each can define the syntax of a
JulijaS [17]

Answer:

The correct answer to the following question will be "Semantic and Syntax error".

Explanation:

<u>Syntax error: </u>

Corresponds to such a mistake in a pattern sentence structure that is composed in either a specific language of that same coding. Because computer programs have to maintain strict syntax to execute appropriately, any elements of code that would not adhere to the programming or scripting language syntax can result inside a syntax error.

<u>Semantic error: </u>

That would be a logical error. This is because of erroneous logical statements. Write inaccurate logic or code of a program, which results incorrectly whenever the directives are implemented.

So, it's the right answer.

3 0
3 years ago
The act of getting information out of memory storage
IRISSAK [1]

Answer:

'retrieval'

Explanation:

8 0
2 years ago
Other questions:
  • What is special about the f and j keys on a standard keyboard?
    15·2 answers
  • When you enter a two-digit year that is less than 30, Excel changes the year to _____. Question 7 options:
    7·1 answer
  • Need this!!
    11·2 answers
  • Which ofthe following sentence beginnings would be best to use in apersuasive request?
    8·1 answer
  • CHALLENGE ACTIVITY 3.7.2: Type casting: Reading and adding values.
    10·1 answer
  • Which statement best compares routers and hubs?
    9·1 answer
  • Next, Kim decides to include a diagram of a frog’s life cycle in her presentation. She wants to use an image that is part of a p
    15·2 answers
  • 3n - 12 = 5n - 2<br> how many solutions?
    15·1 answer
  • Which of the following correctly declares and initializes a Scanner object that will use input from the keyboard as its data sou
    13·2 answers
  • A recursive method that computes the number of groups of k out of n things has the precondition that ______. n is a positive num
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!