I want to implement a vector in Javascript with the following requirements:
- Can access an item using a numeric index (position)
- Can delete an item using a numeric index (position) – even in the middle of the collection
- Can add an item to the end of the vector
What is the preferable way to do it?
Arrays do this already: