Depends on the programming language. In JavaScript, it literally means that like the key or variable does not actually exist. Whereas like in C/C++, writing random bytes to random memory addresses would result in “undefined behaviour” which means basically anything could happen.
Depends on the programming language. In JavaScript, it literally means that like the key or variable does not actually exist. Whereas like in C/C++, writing random bytes to random memory addresses would result in “undefined behaviour” which means basically anything could happen.
In Javascript you can do
let a = undefined
, defining the varialea
asundefined
.A significant difference to defining it as
null
is thattypeof null == "object"
, whiletypeof undefined == "undefined"
.