1// Syntax
2array.splice(index, deleteCount)
3
4// Example 1
5array1 = ['one', 'two', 'three'];
6array1.splice(1, 1);
7console.log(array1);
8// Expected output: ['one', 'three']
9
10// Example 2
11array2 = [{id:1}, {id:2}, {id:3}];
12array2.splice(2, 1);
13console.log(array2);
14// Expected output: [{id:1}, {id:2}]