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]
4 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]4 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
What helps in determining the reliability of a person to repay debt?
drek231 [11]
C) credit score is your answer
6 0
3 years ago
Read 2 more answers
Which term describes a number in base 16, using the digits from zero to nine along with A, B, C, D, E, and
cupoosta [38]

Answer:

It is Hexadecimal

Explanation:

Hexadecimal EX: A3 B8

8 0
3 years ago
Write a program that: Takes the list lotsOfNumbers and uses a loop to find the sum of all of the odd numbers in the list (hint:
Alika [10]

Answer:

Following are the code to this question:

#include <iostream>//defining header file

using namespace std;

int main()//defining main method

{

int x[]={2,3,4,6,7,8,9,1,11,12};//defining 1-D array and assign value

int i,sum=0;//defining integer variable

for(i=0;i<10;i++)//defining loop for count value

{

   if(x[i]%2==1)//defining if block to check odd value

   {

       sum=sum+x[i];//add value in sum variable

   }

}

cout<<sum;//print sum

return 0;

}

Output:

31

Explanation:

In the above-given program, an integer array "x" is declared that holds some integer values, and in the next line two integer variable "i and sum" is defined which is used to calculate the value.

In the next line, a for loop is declared, that counts all array value, and it uses the if block to check the odd value and add all the value into the sum variable.

5 0
3 years ago
What is the primary difference between a Marketing Information System (MIS) and a Decisions Support System (DSS)? a. Cost of imp
SOVA2 [1]

A DSS uses software that allows managers to more fully utilize available information to assist in making decisions  is the primary difference between a Marketing Information System (MIS) and a Decisions Support System (DSS).

<h3><u>Explanation:</u></h3>

A management information system that helps the marketers in making important decisions that are related to the marketing fields refers to the marketing information system. It is the system where the information that are associated with the marketing will be gathered and analysed for making important decisions by the marketing managers.

The information system that helps an organisation in making important decisions are called as Decision support system. The main thing that differentiates MIS and DSS is that A DSS uses software that allows managers to more fully utilize available information to assist in making decisions.

8 0
3 years ago
I need help figuring out 2 pictures with topics that I can put on a magazine about the serengeti. This is something I'm doing fo
Usimov [2.4K]

Answer:

how about lions, trees, or zebras

Explanation:

i looked it up

4 0
3 years ago
Read 2 more answers
Other questions:
  • If you were optimizing for performance and wanted to support potentially adding many new elements to an adt, then:
    12·1 answer
  • Which of the following statements is false? Speaking to your computer is a form of input. Playing a video is an example of outpu
    10·1 answer
  • The World Wide Web is a program that allows you to search for information on the Internet.
    11·1 answer
  • What scheme is usually used today for encoding signed integers?
    5·1 answer
  • Java uses a right brace to mark the end of all compound statements. What are the arguments for and against this design?
    8·1 answer
  • Where do players resurrect if they have been destroyed in a game?
    13·1 answer
  • 3. Fire and police protection is the main responsibility of
    15·2 answers
  • what are examples of conditional formatting tools? check all that apply. color scales, icon sets,data bars,cell styles,themes
    8·1 answer
  • How do you think the blitz might have affected civilian morale in london
    15·1 answer
  • Variables that can take only 2 variables are referred to as which one of the following?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!