subject
Computers and Technology, 04.07.2020 19:01 schwann

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.");
}1. 1 years, and 1 months
2. 1 year, and 1 month
3. 1 years
4. 1 year

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 05:30, donmak3833
Agood flowchart alludes to both the inputs and outputs you will need to receive and give to the user. true or false?
Answers: 3
image
Computers and Technology, 22.06.2019 11:10, golderhadashaowtatz
Which are not examples of chronic or persistent stress? moving
Answers: 1
image
Computers and Technology, 22.06.2019 23:30, lexirandall19
Define a function printfeetinchshort, with int parameters numfeet and numinches, that prints using ' and " shorthand. ex: printfeetinchshort(5, 8) prints: 5' 8"
Answers: 1
image
Computers and Technology, 23.06.2019 00:30, alex7078
Quick pl which one of the following is considered a peripheral? a software b mouse c usb connector d motherboard
Answers: 1
You know the right answer?
If totalMonths has a string value of "13", what does the code that follows display? var years = par...

Questions in other subjects:

Konu
Mathematics, 18.03.2021 02:30