← BYTES
JavaScript·Starter·Ref: 3.1.9

What is the result of `typeof undefined`?

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

a."null"
b."void"
c."object"
d."undefined"
`undefined` is its own primitive type, and `typeof` correctly reports it as "undefined" -- unlike the well-known `typeof null` quirk, this one behaves as you'd expect.

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#BYTES319#JavaScript