+ 3
What is the difference between undefined and null
undefined vs null
2 Respuestas
+ 7
undefined: a variable has been declared but hasn't been assigned a value.
var lol;
null: an assignment value for a variable as a representation of no value.
var lmao=null;
null == undefined // true
null === undefined //false
In this case, they have the same value but different type.
+ 1
tnx Gabby