3 ms·
IsArray: Why is it so bloody hard to get right?
- axod 18y agoBecause Arrays don't really exist properly in javascript. They're just objects, with a magic 'length' property that is set to the largest positive integer index plus one, and a few convenience methods. What sort of example do you need to know if an object is an Array? Never come across this problem yet...