A ReferenceError is a type of error thrown when a variable is used that does not exist.
To prevent this error, all variables should be properly declared beforehand.
A SyntaxError is a type of error that is thrown when there is a typo in the code, creating invalid code - code which cannot be interpreted by the compiler.
Some common causes of a SyntaxError are:
# Example of a SyntaxError in Python# A colon is missing after the closing parenthesisdef sum(a, b)return a + b
A TypeError is a type of error thrown when an attempt is made to perform an operation on a value of the incorrect type.
One example of a TypeError is using a string method on a numerical value.
# Example of a TypeError in Pythonnumber = 1string = "one"# Here, we try to concatenate the number and string which will yield a TypeErrorprint(number + string)
An error stack trace tells a developer that it has detected an error within the code. Along with, which line to find the error, what type of error has occurred and a description of the error.