My shopping list is broken. I load the page, type in the fields, click the button and ...
There are at least 5 errors in this project. They range from typos, incorrect methods, or flat out missing methods.
NOTE: All the errors are in the scripts.js
file. The HTML and CSS files are fine.
Load the page, and start debugging!
- Are the scripts even loading?
- Does the button do anything when you click it?
- Are things spelled correctly?
- Are the right items, or number of items, being selected?
- Are the new elements being created?
- Are created elements being appended to something in the DOM?
- Load the Dev Tools immediately.
- Make generous use of
console.log()
statements to see what is and isn't running. - Work on one error at a time, then move on to another.
- Fixing one error will then uncover any more errors, don't get frustrated, keep moving on until all the errors are gone.