how do I remove an element from an array in java script?