SyntaxErrorSyntaxError
The JavaScript engine encountered code that does not conform to the language syntax.
TypeErrorA value is not of the expected type. This is the most common JavaScript error, occurring when an operation encounters a value of the wrong type.
You attempted to use a value in a way that is incompatible with its type. Common examples include calling a non-function, accessing properties of null/undefined, or passing the wrong argument type to a built-in method.
Check the variable's actual type using typeof or console.log before the failing operation. Add null/undefined checks. Use optional chaining (?.) for potentially null values. Verify function arguments match expected types.
null.property // TypeError: Cannot read properties of nullSyntaxErrorThe JavaScript engine encountered code that does not conform to the language syntax.
SyntaxError: Illegal return statementA return statement was used outside of a function body.
DOMException: The operation was abortedAn operation was canceled via an AbortController signal.
ERR_SOCKET_BAD_PORTAn invalid port number was specified for a network operation.
TypeError: Method called on incompatible receiverA method was called with a 'this' value that is not the expected type.
ERR_HTTP2_STREAM_ERRORAn error occurred on an HTTP/2 stream.