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
Alice is working on a web page to attract the maximum number of people to join her cause. She wants to inform people about the b
Deffense [45]

Answer:

Option D.    Persuasive writing style

is correct answer.

Explanation:

  • Alice should adopt the persuasive writing style as she wants to convince the people to adopt eco-friendly methods of living.
  • When a person write persuasively, this means he/she will present justifications and reasons for that specific opinion he/she is trying to convince the audience.
  • For the correctness of their opinion, different kinds of evidences are prepared so that the fact persuade the reader.
  • Persuasive writing is used widely while writing academic papers, advertisements  and argumentative essays as well.
<h2></h2><h2>i hope it will help you!</h2>

7 0
3 years ago
Write a public static method called getPIDs that has a parameter of type Map called nameToPID (keys are student names and values
Rasek [7]

Answer:

Java program is explained below

Explanation:

import java.util.HashSet;

import java.util.Map;

import java.util.TreeMap;

public class TruckRace1 {

   public static HashSet<String> getPIDs (Map<String,String>nameToPID ){

       HashSet<String> pidSet = new HashSet<>();

       for(String ids: nameToPID.values()){

           pidSet.add(ids);

       }

       return pidSet;

   }

   public static void main(String[] args) {

       Map<String,String> pids = new TreeMap<>();

       pids.put("John","123");

       pids.put("Jason","124");

       pids.put("Peter","125");

       pids.put("Alice","126");

       pids.put("Peny","129");

       HashSet<String> ids = getPIDs(pids);

       for(String id:ids){

           System.out.println(id);

       }

   }

}

4 0
3 years ago
What types of storage can be used to access your data on another computer?
Ivenika [448]
<span>You could use cloud storage. Basically, the things you save are actually saved on another computer, that is, on another server, that is used as a hard drive for many pcs. You can access the cloud storage if you have internet and it works like a normal hard drive. There are even laptops that don't have storage other than cloud storage.</span>
6 0
2 years ago
How does coding work on computers?
sleet_krkn [62]
Coding works through programming/programs. Programs have different coding languages, and text files. The code within the file is known as the "source CODE" this code is used in different ways, causing for the possibility of separate binary files that computers can directly run. Hope I helped.

5 0
3 years ago
Read carefully, is it a he or she?
Tasya [4]
I think there's a typo in the question, otherwise they probably meant a 'she', since the name is Maureen.

Also, the answer is Personal hygiene and grooming.
6 0
3 years ago
Read 2 more answers
Other questions:
  • What has prompted schools to add Internet activities in their academic integrity policies?
    11·2 answers
  • Your mom wants to purchase a computer. She has heard about how the Windows 8 operating system is best-geared for a touch-enabled
    8·1 answer
  • (Analyze scores) Write a program that reads an unspecified number of scores and determines how many scores are above or equal to
    10·1 answer
  • Over the last few years, security cameras and other devices have become more common. Some people argue that these measures viola
    14·2 answers
  • The part of the computer that contains the brain, or central processing unit, is also known as the
    15·1 answer
  • س2) اکتب خوارزميه لحل المعادلة الرياضيه الاتيه
    9·1 answer
  • Pick one of the following scenarios and
    6·1 answer
  • When an organizatin needs a program to do a very specific job, it mayhire someone to write _____ software.​
    10·1 answer
  • Which of the following was most likely used to apply red background and font to some of the cells in column D?
    10·1 answer
  • Which is a benefit of peer-to-peer networking?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!