Creating A Fixed-Length Queue In JavaScript Using Arrays