A TypeError is a specific type of error raised when an operation or function is applied to an object of inappropriate type. You might encounter it in Python or JavaScript.
A TypeError often occurs during operations on two data types.
An example is given below, in which an attempt is made to add an integer to a string:
>>> 3 + "string"
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: unsupported operand type(s) for +: 'int' and 'str'
>>>
Note that this behavior is not universal; some languages do not require two of the same data type to perform operations.