結果 : how to slice last element in array javascript