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
A subclass of Value, LargerValue, is defined with a getValue method that returns twice the value of the parent. Which line is th
Bezzdna [24]

Answer:

return super.getValue() * 2;

suppose the class Value is partially defined below

public class Value

{

private int number;

public int getValue()

{

return number;

}

}

Explanation:

see Answer

3 0
4 years ago
The syntax for accessing a class (struct) member using the operator -> is ____.
weqwewe [10]

Answer:

B. pointerVariableName->classMemberName

Explanation:

The syntax for accessing a class (struct) member using the operator -> is pointerVariableName->classMemberName.

7 0
3 years ago
Read 2 more answers
Beth would like to run an nmap scan against all of the systems on her organization's private network. These include systems in t
Natasha_Volkova [10]

Answer:

<em>B. 10.0.0.0/8. </em>

Explanation:

Using an 8-bit subnet mask ensures the <em>network address is represented by the first octet of the IP address and is very efficient.</em>

The suffix /8 implies that Beth checks all devices in the 10.0.0.0 network (hosts between 10.0.0.0 and 10.255.255.255).

8 0
3 years ago
Another important mode, XTS-AES, has been standardized by the __________ Security in Storage Working Group. a. IEEE b. ITIL c. N
Archy [21]

Answer:

a. IEEE

Explanation:

The organization with the acronym 'IEEE' is commonly known as the Institute of Electrical and Electronics Engineer. The organization is responsible for the standardization and implementation of various important modes such as the XTS-AES. This is widely used for data encryption and it is a major part of the AES algorithm.

8 0
3 years ago
Read 2 more answers
Why is a class called a factory of objects
zhenek [66]

Explanation:

A class is called an object factory because objects are created from a class. An object is an instance of a class.

4 0
4 years ago
Other questions:
  • Implement the function pairSum that takes as parameters a list of distinct integers and a target value n and prints the indices
    11·1 answer
  • During the forensic phase of a security investigation, it was discovered that an attacker was able to find private keys on a poo
    9·1 answer
  • Robert works in a call center and receives a call from Kathy. Kathy says she can no longer access the online reporting applicati
    13·1 answer
  • Using ________ as a promotion method will bring return visitors to your site.
    8·1 answer
  • Irene wants to connect your smart phone wirelessly to her laptop in order to transfer images. which two images could she reasona
    15·1 answer
  • What is NOT a built-in function in python?<br> sqrt()<br> string()<br> fabs()<br> O print()
    12·2 answers
  • Explain how the organ systems work together to warm up the body on a cold day
    12·2 answers
  • What is the setting an alarm clock output??
    10·1 answer
  • The memory used by the CPU to temporarily hold data while processing is called _______. random access memory central processing
    5·1 answer
  • You have a filtered dataset for Customer Sales with some null value rows. You want to remove these rows completely. How will you
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!