1
Array is not a Vector
JavaScript does not have vectors, it uses Array and Object that can both behave like vectors (grows and shrinks).
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 ...
Only top voted, non community-wiki answers of a minimum length are eligible
Related Tags
hash-map × 807python × 271
java × 157
performance × 123
c# × 115
c++ × 89
python-3.x × 65
c × 57
algorithm × 50
beginner × 49
strings × 41
array × 34
programming-challenge × 30
javascript × 28
python-2.x × 26
ruby × 23
linked-list × 23
collections × 21
reinventing-the-wheel × 20
object-oriented × 18
sorting × 17
comparative-review × 16
vba × 14
set × 14
hashcode × 14