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
Consider two different implementations, M1 and M2, of the same instruction set. There are three classes of instructions (A, B, a
Margaret [11]

Explanation:

A.)

we have two machines M1 and M2

cpi stands for clocks per instruction.

to get cpi for machine 1:

= we multiply frequencies with their corresponding M1 cycles and add everything up

50/100 x 1 = 0.5

20/100 x 2 = 0.4

30/100 x 3 = 0.9

CPI for M1 = 0.5 + 0.4 + 0.9 = 1.8

We find CPI for machine 2

we use the same formula we used for 1 above

50/100 x 2 = 1

20/100 x 3 = 0.6

30/100 x 4 = 1.2

CPI for m2 =  1 + 0.6 + 1.2 = 2.8

B.)

CPU execution time for m1 and m2

this is calculated by using the formula;

I * CPI/clock cycle time

execution time for A:

= I * 1.8/60X10⁶

= I x 30 nsec

execution time b:

I x 2.8/80x10⁶

= I x 35 nsec

6 0
3 years ago
Which of the following is the best description of the [Drive for] block?
Ede4ka [16]
The answer is C to this question
6 0
2 years ago
Which access method would be most appropriate if your manager gave you a special cable and told you to use it to configure the s
GrogVix [38]
Console Port Method

Connecting a computer to a Cisco device through the console port requires a special console cable.
8 0
3 years ago
PLEASE help me i dont get this at all
zepelin [54]

Answer:

dont know dont really care

Explanation:

6 0
2 years ago
Read 2 more answers
(word excel)
Aloiza [94]
D is the answer to that problem
7 0
3 years ago
Other questions:
  • Which attribute of the image tag specifies the URL of an image
    14·1 answer
  • Find the range of the function for the domain<br>(-4,-2,0, 1.5,4).<br>f(x) = 5x²+ 4<br>​
    13·1 answer
  • What mobile operating system below requires all applications to be reviewed and approved before they can be made available in th
    7·1 answer
  • Syntax errors ________. a. result from an attempt to perform an operation that cannot executeb. are errors such as misspelled ke
    14·1 answer
  • Easy coding question, please help.
    13·1 answer
  • How many digits are in the binary number system? Explain why.
    11·2 answers
  • Universal Container wants to understand all of the configuration changes that have been made over the last 6 months. Which tool
    15·1 answer
  • Which of the following is considered true regarding modern work environments?
    9·1 answer
  • Why might you use the More button in the Find and Replace dialog box?
    10·1 answer
  • In a selection, the else clause executes ______________. a. always b. when the tested condition is false c. when the tested cond
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!