← BYTES
JavaScript·Starter·Ref: 3.1.13

What is the key difference between `null` and `undefined`?

Have a question about this video? Mention reference 3.1.13 when you contact us.

a.They are exactly the same value
b.undefined can only appear in arrays
c.null is only used for numbers
d.`undefined` means a variable has been declared but not assigned a value; `null` is an explicit value representing 'intentionally no value'
`undefined` is JavaScript's own default for an uninitialized variable, a missing function argument, or a missing object property; `null` is a value a programmer deliberately assigns to represent the deliberate absence of an object.

Find this on YouTube & Instagram

Every BYTES video is tagged with its reference number and topic — search any of these on YouTube or Instagram to find this one:

#BYTES#BYTES3113#JavaScript