Deleting array values and gaps

if i have the following array

myArray[0] = “value 0”;
myArray[1] = “value 1”;
myArray[2] = “value 2”;
myArray[3] = “value 3”;

and i delete the second the value. is there anyway to stop it looking like this:

myArray[0] = “value 0”;
myArray[1] = undefined;
myArray[2] = “value 2”;
myArray[3] = “value 3”;

and make it look like this:

myArray[0] = “value 0”;
myArray[1] = “value 2”;
myArray[2] = “value 3”;

Thanks,
Brendan Smith