Almost every error you will meet in JavaScript belongs to one of four families: TypeError, ReferenceError, RangeError, or SyntaxError.
The most common of all is TypeError. It happens when you try to use a value in a way that its type does not support — like reading a property on undefined, or calling a number as if it were a function: