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
Write at least complete set of HTML code to hyperlink to “Home.html”..
faltersainse [42]

Answer:

HTML Link Colors

By default, a link will appear like this (in all browsers):

An unvisited link is underlined and blue

A visited link is underlined and purple

An active link is underlined and red

You can change the link state colors, by using CSS:

8 0
3 years ago
he primary purpose of a database query is to a. find and retrieve specific information. b. correct information in the database.
cestrela7 [59]

Answer:

find and retrieve specific information

Explanation:

7 0
2 years ago
The most popular input device of a computer is a(n) ____.
zaharov [31]
A keyboard and a mouse

7 0
3 years ago
HELP PLEASE
atroni [7]

Answer: The role of a public relations manager is to keep the image of a celebrity, politician, ect. good so that they can keep their career going while constantly in the eye of the public. Public figures may find this useful because it can help them keep their record clean and have a personal life while also making it seem like they are perfect people to their audience, which in hand can help with business.

Explanation:

5 0
3 years ago
2 4.1.2 Quiz: Information Systems and Business Planning
Delicious77 [7]

Answer:

Option D

Explanation:

Complete question

A management information system is typically used by _____.

A. all levels of employees

B. company executives

C. upper-level managers

D. middle-level managers

Solution

A management information system is typically used by middle-level managers

Option D is the correct answer

Management information system (MIS) helps the middle managers to control the work across the various teams of organization.

5 0
3 years ago
Other questions:
  • A group of students are collaborating on an online research project. What is an example of appropriate online behavior?
    10·2 answers
  • Exceptions can be handled in all of these ways except:
    6·1 answer
  • Columns are labeled with letters and Rows are labeled with numbers.
    5·1 answer
  • A ddr4 dimm with a pc rating of pc4-17000 is running at what speed?
    15·1 answer
  • The purpose of a software design is to enable programmers to implement the requirements by designating the projected parts of th
    14·1 answer
  • Which of the following is NOT a fall prevention system?
    12·2 answers
  • Question # 5
    6·1 answer
  • Write a class Bug that models a bug moving along a horizontal line. The bug moves either to the right or left. Initially, the bu
    13·1 answer
  • Why does computer uses 0s and 1s to procress data​
    7·2 answers
  • Write a program that lets the user perform arithmetic operations on fractions. Fractions are of the form a/b, in which a and b a
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!