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
fenix001 [56]
3 years ago
11

Use the Date object and the Array object to determine and diplay information about the current date on your webpage. Your output

should look like the following (adjusted for the current date):
Computers and Technology
1 answer:
Mnenie [13.5K]3 years ago
6 0

Answer:

  1. var today = new Date();
  2. var dateComp = [];
  3. dateComp[0] = today.getDate();
  4. dateComp[1] = today.getMonth();
  5. dateComp[2] = today.getFullYear();
  6. switch(dateComp[1]){
  7.    case 0:
  8.        console.log("Jan " + dateComp[0] + "," + dateComp[2])
  9.        break;
  10.    case 1:
  11.        console.log("Feb " + dateComp[0] + "," + dateComp[2])
  12.        break;
  13.    case 2:
  14.        console.log("Mar " + dateComp[0] + "," + dateComp[2])
  15.        break;
  16.    case 3:
  17.        console.log("Apr " + dateComp[0] + "," + dateComp[2])
  18.        break;
  19.    case 4:
  20.        console.log("May " + dateComp[0] + "," + dateComp[2])
  21.        break;
  22.    case 5:
  23.        console.log("Jun " + dateComp[0] + "," + dateComp[2])
  24.        break;
  25.    case 6:
  26.        console.log("Jul " + dateComp[0] + "," + dateComp[2])
  27.        break;
  28.    case 7:
  29.        console.log("Aug " + dateComp[0] + "," + dateComp[2])
  30.        break;
  31.    case 8:
  32.        console.log("Sept " + dateComp[0] + "," + dateComp[2])
  33.        break;
  34.    case 9:
  35.        console.log("Oct " + dateComp[0] + "," + dateComp[2])
  36.        break;
  37.    case 10:
  38.        console.log("Nov " + dateComp[0] + "," + dateComp[2])
  39.        break;
  40.    case 11:
  41.        console.log("Dec " + dateComp[0] + "," + dateComp[2])
  42.        break;
  43. }

Explanation:

The solution code is written in JavaScript.

Firstly, create a Date object (Line 1). The date object will automatically capture the current date and time.

Next create an array dateComp to hold the day, month and year (Line 3 -5). We use the getDate method to get current day, getMonth method for current month and getFullYear method for current year.

This is important to note that the getMonth method will return the value range from 0 - 11 with the Jan is represented as 0, Feb is 1 and so forth. Presume we intend to display the date using the format "month day, year", we can create a switch structure to check the month value which is range from 0 to 11. If month value is 0, generate string Jan + current day + "," + current year. We generate the date string based on different switch cases (7 - 44). We shall see the output similar to the date string as shown below:

Apr 12,2020

You might be interested in
Why are mobile apps often easier to develop than desktop apps?
Karo-lina-s [1.5K]

Answer:

Mobile app creation platforms are available that reduce the need to code.

Explanation:

Simple app creation softwares and tools are all over the place for mobile app creation. To create a mobile app, no coding knowledge or experience is needed unlike desktops apps that requires the knowledge of some coding languages like python, JavaScript etc.

The availability of these softwares and platforms have made mobile apps creation easy.

6 0
3 years ago
A _________ operates as a standalone device and is shared by multiple users
Orlov [11]
A network printer. that is the correct answer
5 0
3 years ago
Is a network traffic management device used to connect different network segments together?
son4ous [18]
No, network traffic management software is only concerned with the health of the Network.
7 0
3 years ago
When using SSH to remotely access a Cisco router, can you see the terminal password?
viva [34]

Answer:

No, you can't.

Explanation:

SSH is an acronym for Secure Socket Shell and is a networking protocol used for providing remote authentication through a public-key cryptography over an unsecured network such as the internet.

Hence, it is a network protocol that is commonly implemented by using a client-server model; where a computer acts as a SSH client while the other network device acts as the host or SSH server.

When using SSH to remotely access a Cisco router, you cannot see the terminal password because it is Linux based and encrypted through the use of symmetrical encryption, asymmetrical encryption or hashing

5 0
3 years ago
If you are unable to find a saved document, where can the search box be found?
Eva8 [605]

Answer:

C. Next to the start button in the task bar.

Explanation:

The search box is use to find any saved document in the computer , the location of the search box is just near to the start button in the task bar itself .

Hence ,

From the given options i.e. , In the Documents Library. , In the my files area.  ,  Next to the start button in the task bar.  , the correct option to find the search box , In the file locator.

Correct is  Next to the start button in the task bar.

5 0
4 years ago
Other questions:
  • Which of these printers would be the most suitable for printing a large number of high quality black and white printouts?
    15·1 answer
  • An Alias is a nickname???
    7·1 answer
  • What types of disasters might be most likely to affect your community? Type your answers in the space provided. When you are fin
    9·2 answers
  • What two tasks can be executed from the service console for Autonomous Databases? (Choose two.)
    9·1 answer
  • Local area networks use many of the same network technologies and the Internet, only on a smaller scale. Devices that access LAN
    13·1 answer
  • Microsoft PowerPoint is popular software that allows you tocreate slides, handouts, notes, and outlines.
    12·1 answer
  • Employee names are stored using a maximum of 50 characters. This information is an example of which of the following?
    9·1 answer
  • Name the different payment systems the shophive.com isusing?
    15·1 answer
  • What type of Microsoft Server serves as an email server?
    7·2 answers
  • A large number of consecutive IP addresses are available starting at 198.16.0.0. Suppose that four organizations, Able, Baker, C
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!