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
Mazyrski [523]
3 years ago
6

If totalMonths has a string value of "13", what does the code that follows display?var years = parseInt ( totalMonths / 12 );var

months = totalMonths % 12;if ( years == 0 ) {alert ( months + " months.");} else if ( months == 0 ) {alert ( years + " years");} else {alert ( years + " years, and " + months + " months.");
}a) 1 years, and 1 monthsb) 1 year, and 1 monthc) 1 yearsd) 1 year
Computers and Technology
1 answer:
TEA [102]3 years ago
6 0

Answer:

The answer to this question is "Option a".

Explanation:

The description of the JavaScript code as follows:

  • In the code, there is two variable defined that are "years and months". The years convert string value in number and calculate years and holds value in years variable and months variable calculate the moths and holds value in months variable.
  • Then we use conditional statements in this statement we use two if blocks. In first if block we check that years variable value is equal to 0. if this condition is true. it will print months in the alert box.
  • In second if block we check that if months variable value is equal to 0. if this condition is true. it will print years in the alert box.
  • In else block, we use an alert box that prints years and months.

You might be interested in
What field in a TCP segment is used to determine if an arriving data unit exactly matches the data unit sent by the source?
Rina8888 [55]

Answer:

a. Checksum

Explanation:

Based on the information provided within the question it can be said that the field that represents this information is called the Checksum. Like mentioned in the question this refers to a value that represents the amount of bits in a certain transmission message. This is done in order to make sure that the amount of bits that were sent match the amount that were received in order to make sure that no data was lost in transit that would cause high-level errors.

7 0
3 years ago
A computer on a network that is not the server​
katrin [286]

Answer:

A peer-to-peer network is one in which two or more PCs share files and access to devices such as printers without requiring a separate server computer or server software. ... A P2P network can be an ad hoc connection—a couple of computers connected via a Universal Serial Bus to transfer files.

5 0
2 years ago
How does technology improve productivity at home? (Select all that apply.)
Aliun [14]

Answer:

B, C

Explanation:

?

5 0
3 years ago
Fish Aquarium System of functional and Non-Functional requirement of the system.
Alborosie

<em>hoping</em><em> that</em><em> </em><em>it </em><em>was </em><em>helpful</em><em> to</em><em> </em><em>you</em>

<em>plz </em><em>mark </em><em>me </em><em>as </em><em>brainlist</em><em> answer</em>

7 0
2 years ago
Male tiene una bicicleta rosa<br>es biene o es servicio?​
jekas [21]

Answer:

es biene por que es de el no es prestada asi que es biene

8 0
3 years ago
Other questions:
  • What tool listed below will be the most useful for developing presentation content?
    10·2 answers
  • What are pixels? A. Objects that are part of a particle system B. Tiny colored dots that make up images and text on a computer s
    9·1 answer
  • The building blocks of coded language are called
    11·2 answers
  • Arrange the binary number in increasing order of their arithmetic output in the decimal number system ?
    9·1 answer
  • You are a Data Scientist at Anthem Blue Cross Blue Shield. You want to check if a patient will develop diabetes. Please write th
    5·1 answer
  • Which command is used to copy entire folder structures between volumes or across a network while maintaining all NTFS file permi
    10·1 answer
  • Anyone know this awnser computer science
    14·2 answers
  • Describe how a cell’s content and format attributes are related.
    13·2 answers
  • The transmission control protocol (TCP) layer helps computers to communicate in which of the following ways?
    10·1 answer
  • What might a designer need to consider when choosing an appropriate energy source for products and power systems
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!