You can delete array elements using
delete operator. Let's
look at examples. Let's say we have
an array like this:
let arr = ['a', 'b', 'c'];
Let's delete one of the elements of our array:
As a result, the element will be deleted, but the array will become sparse:
console.log(arr); // shows ['a',, 'c']
Given an array:
let arr = ['a', 'b', 'c', 'd', 'e'];
Delete two elements from it.
Check the value of the property
length after that.