Simple JavaScript queue built from two stacks