Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

JavaScript C13 Question 11 (1 point) Which parameters are required when you call the Date constructor with number parameters? Question 11 options: the year and

JavaScript C13

Question 11 (1 point)

image text in transcribed

Which parameters are required when you call the Date constructor with number parameters?

Question 11 options:

the year and month

the year, month, and day

the year, month, day, and hours

the year, month, day, hours, and minutes

Save

Question 12 (1 point)

image text in transcribed

What method of the Date object gets the day of the month in local time?

Question 12 options:

the getMonth() method

the getDate() method

the getDay() method

the getDayOfMonth() method

Save

Question 13 (1 point)

image text in transcribed

What does the getMonth() method of the Date object return?

Question 13 options:

An integer value for the month, starting with 1 for January, 2 for February, etc.

An integer value for the month, starting with 0 for January, 1 for February, etc.

A string value for the short month name.

A string value for the full month name.

Save

Question 14 (1 point)

image text in transcribed

What is the value of salesTax after the following code executes? var salesTax = 53.937; salesTax = parseFloat( salesTax.toFixed(2) );

Question 14 options:

NaN

53.937

53.94

53.93

Save

Question 15 (1 point)

image text in transcribed

Which of the following statements performs a case-insensitive comparison of the strings named text1 and text2?

Question 15 options:

text1 = text2

text1 == text2

text1.toLowerCase() = text2.toLowerCase()

text1.toLowerCase() == text2.toLowerCase()

Save

Question 16 (1 point)

image text in transcribed

Given a Date object named due_date, which of the following statements sets the month to February?

Question 16 options:

due_date.setMonth(1);

due_date.setMonth(2);

due_date.setMonth("Feb");

due_date.setMonth("February");

Save

Question 17 (1 point)

image text in transcribed

What text does the following code display in the dialog box? var investment = "$100"; if ( isNaN(investment) || investment }

Question 17 options:

Investment is not valid.

Investment: $100

Investment: $100.00

Investment: 100.00

Save

Question 18 (1 point)

image text in transcribed

What is the value of random after the following code executes? var random = Math.floor(Math.random() * 10); random = random + 1;

Question 18 options:

An integer between 0 and 10

An integer between 1 and 10

A decimal between 0.0 and 10.0

A decimal between 1.0 and 10.0

Save

Question 19 (1 point)

image text in transcribed

Which of the following statements adds 21 days to the date in the dueDate variable below? var dueDate = new Date();

Question 19 options:

dueDate = dueDate + 21;

dueDate = dueDate.getDate() + 21;

dueDate.setDate(21);

dueDate.setDate( dueDate.getDate() + 21 );

Save

Question 20 (1 point)

image text in transcribed

What do you need to do to determine how many days there are between the dates in the two variables below? var taxDay = new Date("4/15/2017"); var xmas = new Date("12/25/2017");

Question 20 options:

Subtract the value returned by taxDay.getDate() from the value returned by xmas.getDate().

Subtract the value returned by taxDay.getDay() from the value returned by xmas.getDay().

Subtract the value returned by taxDay.getTime() from the value returned by xmas.getTime(), then divide that value by 86400000 to convert it from milliseconds to days.

Subtract the value in the taxDay variable from the value in the xmas variable.

Save

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

PostgreSQL 10 High Performance Expert Techniques For Query Optimization High Availability And Efficient Database Maintenance

Authors: Ibrar Ahmed ,Gregory Smith ,Enrico Pirozzi

3rd Edition

1788474481, 978-1788474481

More Books

Students also viewed these Databases questions

Question

Discuss five types of employee training.

Answered: 1 week ago

Question

Identify the four federally mandated employee benefits.

Answered: 1 week ago