javascript: remove array element