You are browsing as a guest. Sign up (or log in) to start making projects!

1h 56m 38s logged

I decided to add more products to the interface, and I felt that it’s quite repetitive to constantly add lines like document.getElementById(“price1”).innerHTML = price1;. If this was Java I would have used an ArrayList of Products objects with price, name, etc. and it was only today that I had learnt that there is that such feature exists in JS. The trouble is, it’s quite tricky for me to learn it, because it looks very complex. Changing and implementing my idea is still in progress. The biggest struggle is retrieving values in the .js file (that has the ArrayList) into the HTML file because it’s so hard… for your reference, I’m very new to website design. The other hardship is calculating the price and displaying in payment.html; I have no idea how to get variables to be universal and accessed from every file. Any help is appreciated!

0
12

Comments 0

No comments yet. Be the first!