結果 : how to remove element based on index in javascript