Java Array Delete Element Javascript Value Undefined