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
A Hierarchy Custom Setting stores a specific URL for each profile in Salesforce. Which statement can a developer use to retrieve
Mariana [72]

Answer:

The correct answer is option (B) "{!$Setup.Url_Settings__C.URL__c}".

Explanation:

In computer programing using Visualforce, "$Setup" refers to a global merge field that gives the user access to hierarchical custom settings. In this case, the developer needs to retrieve the correct URL to access the current user's profile and display this on a Visualforce Page. "$Setup" will give the developer access to the hierarchical custom settings in Visualforce, and the command "Url_Settings__C.URL__c" will provide the root access to the current user's profile.

4 0
3 years ago
If the wrong server edition is installed, what command can be used to change to a different edition?​
nekit [7.7K]
Dism because it is used to change and service programs
6 0
3 years ago
Which type of communication protocol converts data into standard formats that can be used by applications?
larisa86 [58]
<span>Arrival protocols are the type of data protocols that convert data into standard formats that can be used by applications, such as email, Web browsers and Skype</span>
8 0
3 years ago
A photo's color intensity can be modified by changing the brightness and content.
fiasKO [112]
The above statement is FALSE.

A photo's color intensity can be modified by changing the brightness and CONTRAST.

There are four common image controls that makes an image easy to view. These controls are brightness, contrast, saturation, and sharpness.

Brightness control simply brightens the whole image from the shadows to the highlights equally.

Contrast control is the separation between the darkest and brightest areas  of the image.

Saturation control is the separation of colors in the image.

Sharpness control is defined as the edge contrast, meaning the edges in the image are the ones being contrasted.
6 0
3 years ago
Open Comments.java and write a class that uses the command window to display the following statement about comments:
riadik2000 [5.3K]

Answer:

Answers to the code are given below with appropriate guidelines on definitions and how to properly run the code

Explanation:

//3 ways to comment are as follows:

//1. This is a one line comment.

/**

* 2. This is a documentation comment.

* @author Your name here

*

*/

/*

*3. This is a multiple line comment

* */

public class Comments {

//Driver method

public static void main(String[]args) {

/*

* All the text written inside the

* sysout method will be displayed on

* to the command prompt/console*/

System.out.println("Program comments are nonexecuting statements you add to a file for the purpose of documentation.\n");

System.out.println("3 ways to add comments in JAVA are as follows: \n");

System.out.println("1. One line comment can be written as:\n//Program comments are nonexecuting statements you add to a file for the purpose of documentation.\n");

System.out.println("2. MultiLine comment can be written as:\n/* Program comments are nonexecuting \n * statements you add to a file for the \n * purpose of documentation.\n */\n");

System.out.println("3. Documentation comment can be written as follows:\n/**\n * Program comments are nonexecuting statements you add to a file for the purpose of documentation.\n **/");

}

}

Steps to Run:

1. Make file named Comments.java, and copy paste the above code.

2. Open command prompt and then go to the directory where you have saved the above created file.

3. The before running compile the code by using command

javac Comments.java

4. Now, run the code by the below command

java Comments.

Congrats your assignment is done!!

8 0
3 years ago
Other questions:
  • OSHA requires that employers pay for most required personal protective equipment (PPE), including: A. Hard hats B. Logging boots
    5·1 answer
  • Need help writing a program that reads a string if the option "E" (enter a string) is chosen, and checks if parentheses (), brac
    14·1 answer
  • A number of related records that are treated as a unit is called
    6·1 answer
  • Technologies have advanced to allow computer chips to be placed in almost anything and to be connected to a network almost anywh
    8·1 answer
  • A(n) ____________________ is hardware or software that blocks or allows transmission of information packets based on criteria su
    13·1 answer
  • In an income statement subtracting the cost of goods sold from the net sales provides the?
    11·1 answer
  • I nees the meaning of these words even just one of them would help out ( pixel megapixel colour depth bit and byte)
    15·2 answers
  • What is the function of a breadcrumb trail in a website?
    13·1 answer
  • These 2 questions PLEASEEE (:
    14·1 answer
  • What are the local, state, and national opportunities that may be available to those who participate in CTSOs?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!