Question: HTML Coding I have a file named info.js and it has 3 different variables. It has name, phone number and order number (i.e 1-10) properties

HTML Coding

I have a file named info.js and it has 3 different variables. It has name, phone number and order number (i.e 1-10) properties for each item and then I have a list (let people = [leia, john, fred];) I am trying to make an HTML drop-down menu however I need to dynamically create the drop-down menu items from the people array in my external info.js file. I do not know how to call it in the HTML file I have. I tried the code in the image below but it won't display the drop-down options from the people array.

My code trial:

HTML Coding I have a file named info.js and it has 3

Example of person array content:

different variables. It has name, phone number and order number (i.e 1-10)

I have looked at many different StackExchange posts however nothing is working. Please help :(

let fred = { name: "Fred Logan", phone_number: 1234567890, order: 5

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!