How can you get the full text of the day of the week based on information retrieved from a Date object??

What will be an ideal response?


If you need to return the full text of the day of the week or the full text of the month, you should assign the days of the week or the months of the year to an array. You can then combine thegetDay()orgetMonth()method with the array name to return the full text of the day or month. For example, the following code includes an array namedmonthswith 12 elements that are assigned the full text names of the months of the year: var today = new Date(); varmonths=["January","February","March",? "April","May","June",? "July","August","September",? "October","November","December"]; var curMonth = months[today.getMonth()];In the preceding code, the full text name of the month is assigned to the curMonth variable using the statementvar curMonth = months[today.getMonth()];. The value of the array element is retrieved by placing thetodayobject with thegetMonth()method appended to it between the brackets of the months array name.?

Computer Science & Information Technology

You might also like to view...

Describe three precautions that you should follow when creating a master document and several subdocuments

What will be an ideal response?

Computer Science & Information Technology

FIGURE WD 2-1Referring to Figure WD 2-1 above, the word "exercise" ____.

A. appears in the Search Document box B. appears in the Navigation Pane C. both a. and b. D. neither a. nor b.

Computer Science & Information Technology

When Windows 8.1 connects to a new wireless network, it prompts you to decide whether you want to turn on sharing for that network. Selecting No, don't turn on sharing or connect to devices tells Windows 8.1 to configure the connection as a ________ network

Fill in the blank(s) with correct word

Computer Science & Information Technology

For the style rule, a:hover {font-weight: bold; color: #009900; text-decoration: underline;}

a. What is the technical name for the :hover element? b. Name two similar elements

Computer Science & Information Technology