Python Queue Put Method In Javascript