Find Element Index In Array Js Push And Pop