5. Shopping Cart - JS Advanced
Здравейте банда,
Може ли малко support. Judge ми дава 75/100 на по долната задача и не мога да си открия от къде идва грешката. Ако някой се сеща моля да помогне.
Кода ми : https://pastebin.com/1Ktk7kGR
Линк към ресорсите: https://judge.softuni.bg/Contests/Compete/Index/1802#0
You will be given some products that you should be able to add to your cart. Each product will have a name, picture and a price.
When the "Add" button is clicked, append the current product to the textarea in the following format: "Added {name} for {money} to the cart.\n".
When the button "Checkout" is clicked, calculate the total money that you need to pay for the products that are currently in your cart. Append the result to the textarea in the following format:
"You bought {list} for {totalPrice}."
The list should contain only the unique products, separated by ", ". The total price should be rounded to the second decimal point.
Also, after clicking over "Checkout" and every from above is done you should disable all buttons. (You can't add products or checkout again, if once checkout button is clicked)