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
Please try and solve this
Genrish500 [490]

Answer:

Many students coming into Woodworking 108 are bewildered by “all those little marks ... Parts of an inch will be referred to in fraction form instead of its decimal equivalent. ... on divisions of 2: 1” 2= ½”. ½” 2= ¼”. ¼” 2= 1/8”. 1/8” 2= 1/16”. 1/16” 2= 1/32” ... way is to realize there are 16/16 in an inch and count back 3 of the 1/16 ...

Explanation:

4 0
3 years ago
Felicia's Wi-Fi connection to her phone is extremely slow. However, her
Alex Ar [27]

Answer: fake water all across the road

Explanation:

3 0
3 years ago
Read 2 more answers
_ includes websites that encourage interaction and connection among people, businesses, and organizations. A. News sites B. Sear
Dovator [93]
> News sites give information about news or what is trending around the area or world (CNN, Fox, MSNBC, etc) 

> Search engines is what allows you to look up websites (Google, Bing, Yahoo, etc) 

> Social media AKA Social Networking sites is interaction social sites where you connect with various people from around the world. (Facebook, Twitter, Google+, etc)

>Apps is short for applications which is an application that has a specific function (Games, Music, Social networking) 

So based on this, you answer is C. Social Media
6 0
3 years ago
Read 2 more answers
In the library 6 students are working on math. of those 6 students 2/3 of them are working on fractions. how many students are w
zmey [24]
Explanation:
The word "of" in a fraction word problem USUALLY means to multiply. So we multiply 6 x 2/3

6 2 12
- x - = - = 4
1 3 3
6 0
2 years ago
What is the typical first shot that everyone takes? In photography
Firlakuza [10]

Answer:

the sky or of nature in general

Explanation:

7 0
2 years ago
Other questions:
  • What is the importance of using the proper markup language?
    8·2 answers
  • What piece of software tells the operating system how to use a specific hardware device?
    14·1 answer
  • The manager of a sports club has data about the club members' ages in a workbook. He wants to find which age is most common. Whi
    13·2 answers
  • software that provides capabilities common across all organizations and industries is known as ________ software.
    15·2 answers
  • This is not based on homework but I have a question. I am currently using a gtx 960 with a 6 core amd processor. Does anyone kno
    6·1 answer
  • Part of preforming routine computer maintenance includes
    9·2 answers
  • Who like the videos where is clown is from :)
    6·1 answer
  • PLEASE ANSWER FAST, WILL GIVE BRAINLIEST AND 20 POINTS
    11·2 answers
  • When hacking a website to test a secure connection and ensure internet safety, what is a good way to check the coding of the web
    14·1 answer
  • Assume that x and y are boolean variables and have been properly initialized. !(x || y) || (x || y) The result of evaluating the
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!