Question: Create a hospital with 4 patients. Use an array to hold multiple values Each patient has a name, admissionDate, and a set of symptoms. (Use
Create a hospital with 4 patients. Use an array to hold multiple values Each patient has a name, admissionDate, and a set of symptoms. (Use an object to hold information about each patient). Sample Patient data: James Bond "headache","nausea","fever" 2020-01-23 Phil Jackson "headache","sprained wrist","lethargy" 2020-04-20 Kevin Hart "Loud Mouth","anxiety", "fever" 2020-02-13 Michelle Obama "fever","nausea","sore feet" 2019-12-07 Create a function that accepts a hosptial, and returns a random patient, and logs that patient's admission date. Test your function by logging its return value to the console. Use a loop to console.log all the information about each patient. Include the patient name, their symptoms, and admission date. Now it's time to output the data as HTML! In your HTML page, create a new section element for the hospital data. Give it an id of "hospital". This is the only HTML code that you will write in the body of your document. You will use JavaScript to add, modify or remove DOM elements as requested. The requirement is to use JavaScript, NOT HTML, to create the following DOM structure, then append that structure to the page.
Step by Step Solution
3.45 Rating (152 Votes )
There are 3 Steps involved in it
Define Patient object function Patientname symptoms admissionDate thisname name thissymptoms symptom... View full answer
Get step-by-step solutions from verified subject matter experts
