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
Kelly completes a bachelor's degree in animation from a top school in New York. She would now like to look for a job that will p
nikdorinn [45]
I believe she would have a best chance in a media production house, animation is a form of media and would be best put to use there.
8 0
3 years ago
Read 2 more answers
What is a software that allows the user to modify and redistribute?
lara31 [8.8K]
A software that does and allows this is free software
8 0
4 years ago
What threat do insiders with authorized access to information or information systems pose
ki77a [65]

Answer:

Depens on the permissions the user has been granted if the user leaks the infomation it will break the CIA triad rule. To be more specific it will break the confidentiality rule in the triad. If the user has the permission to delete data it will break the availability rule because the data is not avaliable as the user deleted the data. If the user has permissions to edit the data, it will break the integrity rule in the triad because the data is no longer reliable or trustworthy.

7 0
3 years ago
C
Paraphin [41]
The answer is Document Inspector
5 0
3 years ago
What happens in Word 2016 when the Home ribbon tab is clicked on?
Travka [436]

The Ribbon interface in Word 2016 hasn’t changed much compared to earlier versions. The Ribbon has been included in Office suite applications since Office 2007, so you’re probably familiar with how it works. But if you need a refresher,

Just as in Word 2013, the Ribbon in Word 2016 is flatter-looking, cleaner and less cluttered than the one in Word 2010 and 2007. The 2016 Ribbon is smaller than in Word 2013, the title bar is now solid blue rather than the previous white, and the menu text (File, Home, Insert and so on) is now a mix of upper- and lowercase rather than all caps. There are other minor changes as well — for instance, the old Page Layout tab is now called just Layout — but the Ribbon still works in the same way and you'll find most of the commands in the same locations as in Word 2013.

3 0
3 years ago
Other questions:
  • This type of software can be described as end user software and is used to accomplish a variety of tasks. communications system
    15·1 answer
  • William has an internet connection that does not allow him to make calls when connected to the internet. what internet service c
    7·2 answers
  • What part of the System Model is a Flow Chart primarily developed for?
    9·1 answer
  • Using the find and replace tool would be most appropriate when
    6·2 answers
  • 1. How do you know that A Drop of Water is an expository<br> text? GENRE
    7·1 answer
  • You must write a pseudocode process called swapSort which should sort a list of numbers using an algorithm called swap sort.
    13·1 answer
  • What is the purpose of exploring data?
    6·2 answers
  • Write a Python function that join the two string and print it ​
    14·2 answers
  • Could anyone help me with this assignment please?
    6·1 answer
  • With which type of satellite is there a propagation delay?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!