← BYTES
JavaScript·Starter·Ref: 3.1.20

What does `Boolean(0)` evaluate to?

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

a.true
b.0
c.false
d.undefined
0 is one of JavaScript's handful of 'falsy' values (alongside "", null, undefined, NaN, and false itself) -- `Boolean(0)` explicitly converts it to its boolean equivalent, which is false.

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