Question: For this problem, you must use the following data structures: const customers Directory } { C001: {name: John Adams, frequentBuyer: true}, C002: {name: Mary
For this problem, you must use the following data structures: const customers Directory } { C001: {name: "John Adams", frequentBuyer: true}, C002: {name: "Mary Myers", frequentBuyer: true}, C003: {name: "Eric Yin", frequentBuyer: false}, C004: {name: "Patrick Mckenna", frequentBuyer: false} = const sales = { products: [{product: "pullover sweat", unitPrice: 300, quantity: 1}], customerCode: "C001"}, {products: [{product: "formal troussers", unitPrice: 800, quantity: 2}], customer Code: "C004"} [ ]; Write a program in JavaScript to create an interface in HTML that displays the information in the sales array above. Your interface should initially only display the total of each sale and customer's code. Your interface should also present an option that allows the user to see the customer's name in the sale and whether the customer is a frequent buyer or not. Assume the HTML structure given to you below so that your function only updates the #sales element.
Step by Step Solution
3.36 Rating (162 Votes )
There are 3 Steps involved in it
Certainly Heres a simple JavaScript program that creates an interface in HTML based on the provided ... View full answer
Get step-by-step solutions from verified subject matter experts
