Home / Javascript Tips Generated By ChatGPT / Comparing null and undefined in Javascript Distinguish between null (explicit absence of value) and undefined (value not assigned). Source Code let a = null; let b; console.log(a); // null console.log(b); // undefined