Array is not a Vector
Arrays can also be sparse [hash map] or dense [flat sequential array].
Objects are sparse.
Objects do not have a length property
As you have not defined what you mean by vector one must make an assumption in regard to ...