Deleting array elements in JavaScript – delete vs splice

delete will delete the object property, but will not reindex the array or update its length. This makes it appears as if it is undefined: Note that it is not in fact set to the value undefined, rather the property is removed from the array, making it appear undefined. The Chrome dev tools make this distinction clear by printing empty when … Read more

tech