i need the answer to the below problem
/*
Complete the ES6 code below.
Add three cart items to the Cart object with the following properties:
1. Item One
a. Quantity 2
b. Price each $3.95
2. Item Two
a. Quantity 7
b. Price each $5.80
3. Item Three
a. Quantity 1
b. Price each $12.83
Please do not rename any existing variables, functions, or properties. You are welcome to add as many new methods, classes, properties, or variables as you feel is appropriate.
There are a lot of ways to solve this. Please provide your recommendation for the "right" solution, not the "easy" solution. We want to get an idea of how many new classes and methods you create, and how you structure those classes and methods.
*/
class Cart {
constructor () {
[login to view URL] = [];
}
get totalPrice () {
}
}
const cartInstance = new Cart();
Technology Village is a leading Digital marketing Agency in Islamabad, Pakistan.
Our support is available round the clock and we are also comfortable with urgent deadlines. We are on top of Google, if searched from website development
company in Islamabad
Please feel free to contact me for any doubt/query. Awaiting an affirmative response from your end.
Hi, I have seen your project requirements and I will surely do this work for you. I’m having great experience in html development and developed many apps. Waiting for your prompt reply Regards Codegraphy
Hi,
I have read the code example. There are many ways to achieve the desired result but the efficient way in my opinion is to create a method inside the class that can take items as an arguments and saves them. Please send me a message here and I'll explain further.
Thank you.