js makes an array implementation of a queue easy