Algorithm To Push And Pop In Javascript How To Create