Java Remove Object From Array Js Slice