Remove Element From Array In Place Javascript