in the lower source code after applying a shift or splicing in the array and if the length of the array is zero:
if ((name == 'shift' || name == 'splice') && obj.length === 0) delete obj[0];
any idea why you still need to do this: delete obj[0]
source
share