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
27. List four advantages of Computer Aided Design over traditional hand
tatyana61 [14]

Decrease in error CAD software makes use of some of the best tools, the percentage of error that occurred because of manual designing is significantly reduced.

Decrease in effort when it comes to the amount of effort that was needed for the sake of designing the different models, it has been reduced significantly because the software automates most of the task.

Saves time when you are using the computer aided design software, it will save your time and you can make better and more efficient designs in shorter time duration.

Easy to edit when you are making designs, you may find the need to make alterations. When you are using computer aided design software, it will be much easier to make any changes because you can fix the errors and modify the drawings easily.

8 0
3 years ago
What are the differences between Cc & Bcc in emails that are sent ?​
Ket [755]

Cc stands for " carbon copy " and Bcc stands for " Blind carbon copy ". The difference between Cc and Bcc is that carbon copy (CC) recipients are visible to all other recipients whereas those who are BCCed are not visible to anyone.

8 0
3 years ago
Read 2 more answers
Which components exist in the contextual tab for tables called Design? Check all that apply. Table Styles Export Table Data Prop
EastWind [94]

Answer: table styles, properties, tools, external table data, table style options

Explanation: i took the assignment

4 0
3 years ago
Read 2 more answers
must understand both art and engineering. a. industrial designer b. environmental designer c. interior designer d. graphic desig
enot [183]
It's d. Graphic designer because they design things on the computer with code
7 0
3 years ago
What is 1/10 of 2.0 in decimal form​
son4ous [18]

Answer to this is .2

5 0
3 years ago
Other questions:
  • Ryan is looking at investment opportunities as a cloud service provider. He wants to invest in a deployment-based cloud model th
    11·2 answers
  • Given positive integer numInsects, write a while loop that prints that number doubled without reaching 100. Follow each number w
    8·1 answer
  • kevin is working on a financial project that involves a lot of statistical information. He needs software that allows him to ent
    8·2 answers
  • ____ is a utility that can verify that TCP/IP is installed, bound to the NIC, configured correctly, and communicating with the n
    11·1 answer
  • Your it department enforces the use of 128-bit encryption on all company transmissions. your department also protects the compan
    13·1 answer
  • REPORT THIS USER. HE'S SHOWING HIS YK WHAT TO EVERYONE INCLUDING ME. HIS ACCOUNT PROFILE IS IN THE PICTURE BELOW
    14·1 answer
  • Conclusion for primary memory
    15·1 answer
  • To discover how many cells in a range contain values that meet a single criterion, use the ___ function
    5·1 answer
  • Which of the following is not an advantage of e-commerce for consumers?
    13·2 answers
  • Which of the following are drivers of machine learning growth?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!