結果 : get only last element of array javascript