Linear Queue Implementation Using Array In Javascript