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
Naily [24]
3 years ago
5

Write a program that asks a user to enter a date in month day year format (for example 10 12 2016) and displays the day of the w

eek for that date, in this case, Wednesday.
Computers and Technology
1 answer:
AleksAgata [21]3 years ago
8 0

Answer and Explanation:

Using javascript:

function dayof_theweek(){

var TodayDate = window. prompt("enter today's date in the format 'year, month, day' ");

var Datenow=new date(TodayDate);

var Dayofweek=Datenow.getday();

var Days=["monday","Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"];

if(Dayofweek==indexOf(Days[Dayofweek]))

{

document.createTextnode(Days[Dayofweek]);

}

}

The program above uses a date object which uses the method getday to get the day of the week(get day returns an integer from 0 to 6).we then use a comparison operator == to test the condition that returned value Dayoftheweek is same with the index of the array Days and then print to a html document. The program may need improvements such as the fact that errors may arise when proper input isn't given, and therefore must be handled.

You might be interested in
What is an example of new technology having a positive impact on sustainability?
kolezko [41]

Answer:

The main technology that brings positive news on sustainability in any company would be the use of renewable technology more because we can use energy. For example, by using equipment such as solar panels, windmills or water turbines, we can generate electricity and use it many times.

3 0
2 years ago
If you want to change your system settings, what should you use
Vedmedyk [2.9K]

Answer:

you click on your profile, and you should see settings

Explanation:

4 0
3 years ago
Suppose we have two threads inserting keys using insert() at the same time. 1. (5 points) Describe the exact sequence of events
Leona [35]

Answer:

Say you have a key in a dictionary, or a key in a 2-d list. When you insert(), you are destructively iterating the original list and modifying it to reflect the insert() component. In order for the key to get lost you would have to do say insert(len: :1) which would remove the second key and therefore cause it to get "lost" because it will be destructivsly removed from its assignment and replaced by whatever you choose to insert.

Rate positively and give brainlist

8 0
3 years ago
Help meeee if you want to please thank you have a good day
irina [24]
Trolling (bullying intentionally, usually online), harassment (make fun of)
4 0
3 years ago
Read 2 more answers
g Fill the validateForm function to check that the phone number is 10 characters long and that the user name is less than 11 cha
Rom4ik [11]

Answer:

function validateForm(event)

{

event.preventDefault();

var phoneNumber = form.phoneNumber.value;

var userName = form.userName.value;

if(phoneNumber.length!=10)

console.log("Phone Number is Invalid");

if(userName.length<11)

console.log("User Name is Invalid"); }

8 0
3 years ago
Other questions:
  • Which data type uses more memory an integer or an unsigned integer?
    6·1 answer
  • The RAM is a type of ____ a.Main Memory b.Secondary Memory c.Human Memory d.EPROM e.EEPROM
    13·2 answers
  • Which of the following statements is​ FALSE? A. Security is a huge concern for nearly all organizations with private or propriet
    14·1 answer
  • The ________ file system supports a maximum file size of 2gb
    12·1 answer
  • If I want to make it look like slide number one is turning a page to slide number two, what effect needs to be applied?
    13·1 answer
  • A 1400 kilogram car is moving at a speed of 25 m/s. How much kinetic energy does the car have?
    15·2 answers
  • Publishers that participate in a display ad network _____ a) get paid each time an advertiser is charged by the ad network for d
    7·1 answer
  • Analyze the code and identity the value of variable a,b and c after the code execution. int a=40, b=50, c=60; if(! (a&gt;=40)) b
    15·1 answer
  • Consumers who wish to make a purchase from other consumer on ebay need tl
    10·1 answer
  • Which case would benefit from Explainable Artificial Intelligence (AI) principles?
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!