結果 : get and remove first element of array javascript