2 Matching Annotations
  1. Mar 2021
    1. 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.
    2. 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.