I am very new to the world of web development.
I am creating a website for a friends new business, so am attempting to first create the shopping cart (I know... stuck on the first big hurdle haha). It was all going so well following this guys tutorial, every letter/syntax exactly the same, proofed about 50 times.
It's strange because the error started happening line 1 in my code (see below) around 75% of my way through the project (this part of it anyway), so when I got fed up I made a test copy of my documents and gradually took EVERYthing out to see if I could narrow it down to a typo... I even did this on html page too as I did some research and saw that one of the causes was a missing div tag. but I ended up with a pristine html doc and just the one line of JS code!! \/ \/ \/
This is the code on line 1 (the only code in the end still returning error!) See error in subject above.
**let carts = document.querySelectorAll('.add-cart');**
As im so new, please 'spell it out to me' :) if you can!
So much appreciation goes to anyone that tries to help, this is driving me mad!
Let me know if it would help to upload the whole project.