Question: How do I code html with the below? I get stuck and the code doesn't run. Compulsory Task 1 Follow these steps: Create a new
How do I code html with the below? I get stuck and the code doesn't run.
Compulsory Task
Follow these steps:
Create a new JavaScript file in your task folder called guestList.js
Ask the user to input the names of people they would like to invite to a
dinner party.
Each name should be added to an array.
When the user inputs the eleventh name, the program should return a
message in the prompt box which reads: "You can only add a maximum
of people to your guest list. Would you like to replace someone on the
list with the last person you entered? yesno:
If the user enters "yes", the program should ask the user to "Please enter
the name of the person you would like to replace". Note: The program
should replace a person from the first guests with the th person at
the index position of the person they select to replace. The updated list
with the replacement should then be displayed.
If the user enters no the program should only display the guest list
consisting of the first people that the user originally input.
Ensure that the program handles all variants of yesno responses from
the user meaning YES, yes, NO no etc. should all be recognised.
Display the guestlist that is output on a single line with each name
separated by a comma.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
