Getting JS list into my django

So, me and my friends are a part of a team for a hackathon and we’re making an ecommerce website. When coming to the add to cart part, he created a list using JS in the frontend for storing the elements in the cart for the respective page with a checkout button (Note that we’re both new to ecommerce website building). Now how can I use the list which contains the items to calculate the total when they press the checkout button?

I think you are talking about JS not Django. Could you please be more specific? some code snippet?

Did you check jQuery Datatable DataTables example - Add rows, this library has a lot of plugins/extensions that you can use for your purposes.