mochacon3738 mochacon3738
  • 10-03-2020
  • Computers and Technology
contestada

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);

Respuesta :

Veltany
Veltany Veltany
  • 14-03-2020

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.

Answer Link

Otras preguntas

1) A particle move along the x axis, as x=tsquare-2t+1(SI unit). (a) The functions of its velocity and accelerator vector against time; (b) Its average velocity
PLZ HELP ME I WILL GIVE BRAINLYEST
help me with this question​
evaluate 27/32 × 16/27, give your answer in its simplest form​
u Question 3 1 pts "Hello, world" is what kind of data? O communicative O integer O decimal O string HELP
Is it true that polygons are closed shapes with straight sides?TRUE OR FALSE?​
Which statement best describes life on the Arabian Peninsula in the sixth century? Most people were monotheistic and lived in towns along the coast. The few peo
1. ang bayani ng Bohol nananguna sa pinakamatagal napaghihimagsik sa kasaysayanng Pilipinas laban sa mgaEspanyol ​
5kgP= 210 N[2]2 kg3 kg5 kgP = 210 NM = 0.21411 kg​
please help.....hhjkjvksksksjd