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
Two strategies for keeping your files in sync
zlopas [31]

Answer:

1. MS Cloud

2. G Drive

Explanation:

5 0
2 years ago
What section in an ethernet frame will you find a Virtual Local Area Network (VLAN) header?
Vadim26 [7]

Answer:

Preamble

Explanation:

In the computer network , the ether-net is the frame of link layer protocol data. This frame is used ether net with physical layer of transport mechanism. The ether net frame is of different type.

  • The ether-net II
  • The Novel raw IEEE 802.3
  • IEEE 802.2 LLC
  • IEEE 802.2 SNAP

Each of the Ethernet frame started from Ether net header. It contains the source and the destination. The MAC address is called its first two address.

8 0
3 years ago
Which term is used to mean the methods of a predator uses to befriend youth online?
sammy [17]
Pretty sure its called the grooming process

6 0
2 years ago
Read 2 more answers
The AND operator is a disjunction and the OR operator is a conjunction.
qwelly [4]

Answer:

True but it might be false but i think is true

8 0
2 years ago
The batteries on electric vehicles are recharged using electricity from either a wall socket or dedicated charging unit.
yuradex [85]

Answer:

true

Explanation:

7 0
2 years ago
Other questions:
  • A(n) _______ created in Microsoft Word or another word-processing program works well as a shell for a PowerPoint presentation.a.
    9·1 answer
  • The project started the development of inter-network connections using tcp/ip that has evolved into the internet today.
    5·1 answer
  • (1) The given program outputs a fixed-height triangle using a * character. Modify the given program to output a right triangle t
    6·1 answer
  • What does <3 mean at the end of a message?
    9·1 answer
  • Identify the layout in which you will be able to view and edit the header and footer
    12·1 answer
  • A coworker asks your opinion about how to minimize ActiveX attacks while she browses the Internet using Internet Explorer. The c
    14·1 answer
  • A TCP ________ segment is a request to the other transport process to close a connection. ACK FIN SYN CLS
    15·1 answer
  • Part 2: a) Write VHDL code for a top module that invokes necessary components to display the four decimal digits on four seven-s
    5·1 answer
  • Retail products are identified by their Universal Product Codes (UPCs). The most commonform of a UPC has 12 decimal digits: The
    8·1 answer
  • What chage command should you use to set the password for jsmith to expire after 60 days and give a warning 10 days before it ex
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!