
undefined means a variable has been declared but not yet assigned a value. null means a variable has been deliberately set to have no value. They are different: undefined happens automatically, null is set intentionally by the programmer. Both are falsy values in conditional checks.
Reference:
TaskLoco™ — The Sticky Note GOAT