2 Matching Annotations
- Mar 2021
-
stackoverflow.com stackoverflow.com
-
An array is from a logical point of view not an object - although JavaScript handles and reports them as such. In practice however, it is not helpful to see them equal, because they are not.
-
arrays are not objects from a logical point of view. I'm speaking about program logic. It is sometimes necessary to check if an array is a "real" array and definitely not an "real" object. That's what Array.isArray() is for. Imagine you have a function which accepts an object or an array of objects.
-