TODO: if index is nearer to the end then iterate from the end
index of element to be removed
Generated using TypeDoc
TODO: if index is nearer to the end then iterate from the end