occurs when something can't be done on the subject of the statement.
JS ⟩ error ⟩ TypeError
(runtime error) occurs when some operation can't be performed on the subject (value/object) of the statement. (that is, the subject of the action is of the "wrong" type, it isn't capable to do that kind of thing)
'xxx' is not a function❗️
assignment to constant variable❗️
cannot read properties of nullish❗️
cannot convert BigInt to Number❗️
cannot convert Symbol to Number❗️
⛔const - can't be reassigned, redeclared❗
⛔ TypeError thrown if "optional chaining" not used to guard againt nullish❗
⛔object -> primitive conversion may result in TypeError❗
TypeErrorarrow-up-right
calling a var (as function) before initialization will cause a TypeError at runtime❗ 👉 var hoisting
Last updated 3 years ago