Remove Random Element From Array Javascript Function Parameters