It depends on the context.
-
“undefined” means this value does not exist.
typeofreturns “undefined” -
“null” means this value exists with an empty value. When you use
typeofto test for “null”, you will see that it’s an object. Other case when you serialize “null” value to backend server like asp.net mvc, the server will receive “null”, but when you serialize “undefined”, the server is unlikely to receive a value.