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
Luda [366]
3 years ago
11

function calculate () { var s = 2; var x = 2; var y = 3; if (x > 4) { s=s+ 2; } else if ( y > 4) { s=s+ 4; } else { s+=3;}

alert ("s="+s); }//close function
Computers and Technology
1 answer:
MAXImum [283]3 years ago
4 0

Answer:

The output of the given JavaScript code is "5".  

Explanation:

In the given JavaScript code, a method calculate is declared, inside the method, three variable "s, x, and y" is declared, in which all variable assigns a value, that is "2, 2, and 3". In the next step, a conditional statement is defined, that check value, which can be described as follows:

  • In the, If the block, x variable checks its value is greater then 4 if it is true, it will add value 2 in s variable otherwise, it will go to else if block.
  • In this block it will check the value of y variable greater then 4 if it is true, it will add value 4 in s variable.
  • In both of the above conditions is false, it will go to else section, in this, variable  "s" add value 3 in its variable, and use an alert box to print its value.
You might be interested in
Jennifer has written a short story for children. What should be her last step before she submits the story for publication?
SSSSS [86.1K]

Answer:

What is the choice of being answer c?

6 0
3 years ago
After merging two arrays is complete you need to
VikaD [51]

Answer: C) copy the merged array back to the original array

Explanation:

 After performing merging of two array then, copy the merge array back to its original array. Merging of two array is done by the process of merge sort. Merging of two array is the similar process of concatenate the two array into the single object.

It basically works on the principle of divide and conquer algorithm. It divide the input value into the two half and then, sorted the accordingly. Then after completion of merging the two array it copy into the original array.

5 0
3 years ago
What does usb stand for
e-lub [12.9K]
Universal Serial Bus
8 0
3 years ago
Read 2 more answers
Myra just got the latest computer game and wants to play it on her desktop. When she plays the game, she notices that it is slug
diamong [38]

Answer:

Ram/cpu/gpu... Many many things she can do

Explanation:

It may be a issue of internet bandwith, if this new game requires a insane ammount of internet then it may run low FPS (frames per second) and make myra's game look slughish,but anouther issue may be the ram or cpu, like if this is a new game and you've always played like simple games, so your running on persay a core i3 or i4, it aint gonna cut it on a newer game, you gonna need a probably core i5 or i7, or be like any sane person and switch to amd, it may be a bit pricy but if you want nice clean gaming, then amd is the way to go

Also while you are at it get a ssd

I hope this helps "-"

8 0
2 years ago
Read 2 more answers
I need help quick Which of the following principles is not part of the constitution?
laila [671]

Answer:

Confederalism is not in the constitution it was adopted later.

Explanation:

5 0
3 years ago
Other questions:
  • Using Python
    14·1 answer
  • Suppose you want to delete an existing file from within Word. What would you do? A. Click on the File button, choose Recent, ope
    9·1 answer
  • Assume the existence of a class named window with functions named close and freeresources, both of which accept no parameters an
    13·1 answer
  • How fast is a backwards long jump in Super Mario 64?
    7·1 answer
  • A 'array palindrome' is an array which, when its elements are reversed, remains the same (i.e., the elements of the array are sa
    6·1 answer
  • What is the largest value that can be represented by 6 binary digits? .
    5·1 answer
  • Which is an example of a demand account
    10·1 answer
  • Which example illustrates the idea of "collecting data"?
    8·2 answers
  • How to transfer mysql database from one server to another
    6·1 answer
  • Why is quantum computing potentially a better fit for weather forecasting than classical computers?.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!