1. Syntax Errors: These errors occur when pre-defined syntax of the language is not met and they are detected while compiling or parsing source code.
Syntax Error: missing ) after condition.
2. Reference Errors: These errors happen when a non-existent variable is referenced.
Reference Error: “grade” is not defined. It is simply misspelled.
3. Type Errors: These errors occur when an operation couldn’t be performed due to the fact that a value is not expected type.
TypeError: Cannot read property 'addEventListener' of null.
.querySelector accepts a CSS selector as an input, a dot is to be added before
add-btn in the first line of code in order to call the correct element from HTML file.
All I can say is that I like the errors once I know how to fix them. Happy coding!