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
9. In Electronic Codebook (ECB): a. The message is broken into independent blocks which are encrypted b. The message is broken i
DaniilM [7]

Answer:

The correct answer is letter "A": The message is broken into independent blocks which are encrypted.

Explanation:

There are five (5) main forms of encryption: <em>Electronic Code Book (ECB), Cipher Block Chaining (CBC), Cipher Feedback (CFB), Output Feedback (OFB), and Output Feedback (OFB)</em>. Electronic Code Book (ECB) is the simplest of all of them. Using this method to encrypt information implies dividing a message into two parts to encrypt each block independently. ECB does not hide patterns effectively because the blocks are encrypted using identical plaintexts.

8 0
3 years ago
Mengapakah wanita hamil memerlukan jumlah nutrien yang lebih banyak berbanding wanita tidak hamil.
Elan Coil [88]

Answer:

Because of the baby in the womb

Explanation:

Remember, a pregnant woman carries a life (the fetus) in her womb, and the unborn child depends on its mother for food. Such a complex and fascinating stage of pregnancy requires the mother to be well-nourished or else the child may die or suffer some health problems; which may even affect the mother.

5 0
3 years ago
John wants to know the amount of ram memory installed on his computer. in which category of the windows 7 control panel can this
Verizon [17]

John can find the amount of Random Access Memory (RAM) memory installed on his computer with the Windows 7 under the category “<u>System and Security</u>” in the Control Panel.

To know the total amount of installed RAM through Control Panel in the computer with Windows 7, John should follow the steps as:

  • Click the Windows key
  • Type Control Panel
  • Click the category named “System and Security”
  • Now under “System”, click “View amount of RAM and processor speed”
  • “Device Specifications” section displays the amount of installed RAM in John’s computer

Thus, above are the steps by which John’s can find the amount of installed RAM in his Windows 7 computer’s Control Panel.

What is Random Access Memory (RAM)?

RAM is the temporary memory in computers that stores the data currently being used by the processor.

You can learn more about Control Panel at

brainly.com/question/1445737

#SPJ4

5 0
1 year ago
Assume the method doSomething has been defined as follows: public static void doSomething (int[] values, int p1, int p2) { int t
Dmitriy789 [7]

Answer:

The answer to this question is option "b".

Explanation:

In the method definition, we perform swapping. To perform swapping we define a variable "temp" that swap values of variable p1 and p2 and store in array that is "values". and other options are not correct that can be defined as:

  • In option a, It does not insert any new value in array because we do not pass any value in function.
  • In option c, The function does not copy and assign a value in a new array because in this function we not assign any new array.  
  • In option d, It is incorrect because it can not move an element into high index position.
8 0
3 years ago
Carl is a music teacher. He builds custom computer systems for his students to use when they are learning and creating music. Ca
shutvik [7]

Answer:

um ahh <em> </em><em>badl</em><em>y</em><em> </em>

Explanation:

i really don't know the answer

4 0
2 years ago
Other questions:
  • When a crystal grows in unrestricted space, how does growth occur?
    14·2 answers
  • Why is timbre an important musical element?
    7·2 answers
  • When you make a pointer variable im C++, is star label a must?
    9·1 answer
  • Learning about public speaking can help improve your ________________.
    15·1 answer
  • Write a client program that writes a struct with a privateFIFO name (call it FIFO_XXXX, where XXXX is the pid that you got from
    11·1 answer
  • What are some situations where you might find it useful to use the “!” symbol in a program?
    9·1 answer
  • python This program outputs a downwards facing arrow composed of a rectangle and a right triangle. The arrow dimensions are defi
    5·2 answers
  • How old was the mummy where they found a wooden prosthetic toe on him?
    6·1 answer
  • How many atoms of oxygen in 4 molecules of HN03​
    12·1 answer
  • Many large companies use the word(s), _____, to refer to the huge network of computers that meets their diverse computing needs.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!