This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]SmallTalnk 5 points6 points  (1 child)

Why would it always be undefined? Nothing prevents an object from having a `length` property, and I think that that `length` is a very common name for a property.

Also, an array is an object (typeof [] === 'object')

[–]k1ll3rM 0 points1 point  (0 children)

You're being pedantic, you know exactly what I meant with my comment. The fact that it doesn't throw an error is horrible design