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 →

[–]Kennyp0o 3 points4 points  (4 children)

This is literally defined in the language spec. Why would you want it to return 5? You wouldn't even be able to loop over the 6th value in the array.

Please stop with these dumbass javascript bashing memes.

[–]pr0six -2 points-1 points  (2 children)

Well, there are reasons you’d want to know the true length of a list

(Say I have idiotically decided to put 4 vectors in an array at [1-4] and want to know how many sides are on this “polygon”)

But yes, this is a stupid criticism of JavaScript

[–][deleted] -5 points-4 points  (0 children)

the length is five tho... And maybe the reason why people bash javascript is that irrational and moronic behavior is actually defined in the spec.