remove Summary Removes the array element at the specified index. Signatures Click on a signature to select it and view its documentation. public void remove(int index) public void remove(int index, int deleteCount) Usage public void remove(int index) public void remove(int index, int deleteCount) Parameters index The index of the element to remove. Parameters index The index of the first element to remove. deleteCount The number of elements to remove following the first element. Description Removes the array element at the specified index. This method mutates the array. Removes array elements starting from the specified index for the specified deletion count. This method mutates the array. Examples Basic Usage 12345import System; int[] arr = [ 1, 2, 3 ];arr.remove(1);Console.log(arr.toString()); // "1,3" Remove each array element individually 1234567import System; int[] arr = [ 1, 2, 3 ];for(int i = arr.length; i >= 0; --i) { arr.remove(i);}Console.log(arr.toString()); // "" Basic Usage 12345import System; int[] arr = [ 1, 2, 3 ];arr.remove(0, 1);Console.log(arr.toString()); // "2,3" Share HTML | BBCode | Direct Link