← BYTES
JavaScript·Starter·Ref: 3.1.6
What does `Array.isArray([])` return?
Have a question about this video? Mention reference 3.1.6 when you contact us.
a.true
b.false
c.undefined
d."array"
`Array.isArray()` is the reliable way to check whether a value is a real Array (unlike `typeof`, which returns "object" for arrays too); an empty array is still an array, so this returns true.
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#BYTES316#JavaScript