But push()ing and pop()ing is not what the original poster wants to do. He wants to splice(). It doesn't matter if he's talking about treating a stack in the traditional sense, and it doesn't matter that splice is not as efficient as push or pop. What matters is that he knows how to accomplish what he requested.
-- Tim Tompkins