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
Leni [432]
3 years ago
10

After the following code runs, what will be the value of result? var x = 30; function get () { return x; } function set (value)

{ x = value; } set(10); var result = get(20);
Computers and Technology
1 answer:
PilotLPTM [1.2K]3 years ago
5 0

Answer:

Null

Explanation:

It entirely depends on the language you are using to implement this.

But generally by the rule of scope, "result" will return null since get() was not defined to accept any argument, and it neither know the global "x" not defined it's own x in the function.

You might be interested in
If Johanna wants to label the x- and y-axes in Excel she should click Layout, then what?
denis-greek [22]
<span> If Johanna wants to label the x and y axes in an Excel chart, she should click anywhere on the chart, then click on the Layout tab. Under Labels, she should click on Axis Titles, and select the Secondary Horizontal Axis Title for x axis or <span>Secondary Vertical Axis Title for y axis. She should then select the text that is in the Axis Title box, and type the title name that she wants.</span></span>


6 0
2 years ago
HELP !!! Prompt <br> What is formatting text?
Svetach [21]

Answer:

Formatting text is how something is specifically layed out. Specific style.

Explanation:

7 0
2 years ago
Read 2 more answers
Write a filter that reads in a sequence of integers and prints the integers, removing repeated values that appear consecutively.
lara31 [8.8K]

Answer:

Following is the code for filter:

public class filter

{ public static void main(String[] args)

{ int x = StdIn.readInt();

System.out.print(" " + x + " ");

while(!StdIn.isEmpty())

{ int y = StdIn.readInt();

    if(y != x)

          System.out.print(" " + y + " ");

    x = y;

    }

    }

    }

Explanation:

  • A public class filter is used.
  • The main function will accept a single argument as string[], it is also known as java command line argument.
  • Now the Stdln.readInt is used to read the integers in the sequence and store it in integer x.
  • The value stored in variable x will be printed using System.out.print
  • Now unless the Stdln.readInt gets an empty value, check each value of sequence and store in variable y.
  • If y is not equal to previous value x, print it and shift the value of y into x.
  • Repeat the loop again.

i hope it will help you!

7 0
3 years ago
Read 2 more answers
Write the interface (.h file) of a class Counter containing: A data member counter of type int. A data member named counterID of
OlgaM077 [116]

Explanation:

See the attached image for The interface (.h file) of a class Counter

8 0
3 years ago
If you wanted to detect x-rays coming from the sun,where would you place the detector? Why?
Temka [501]
You would place it in orbit around Earth, as most X-rays are absorbed by the atmosphere, so you would want the detector outside of the atmosphere to accurately detect the X-rays.
5 0
3 years ago
Other questions:
  • In number theory, a perfect number is a positive integer that is equal to the sum of its proper positive divisors, that is, the
    12·1 answer
  • Which of the following matching is true concerning the Protocol Data Unit (PDU) and its corresponding OSI layer location?
    15·1 answer
  • Consider this data sequence: "fish bird reptile reptile bird bird bird mammal fish". let's define a singleton to be a data eleme
    5·1 answer
  • Which feature of the Excel window should I use to perform an action
    11·1 answer
  • What is runtime error in Python? Provide an example
    14·1 answer
  • High capacity circuits are limited by the least capable network link, which is typically the user connection. As such, it is imp
    11·1 answer
  • What steps should a user take to create a secondary address book?
    8·2 answers
  • PLZ HELP ASAP
    13·1 answer
  • List three ways of breaking a copyright law with the illegal copy of software.​
    11·1 answer
  • Which bits of the address would be used in the tag, index and offset in a two-way set associative cache with 1-word blocks and a
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!