6.3. Delete
Since JavaScript's arrays are really objects, the delete operator can be used to remove elements from an
array:
delete numbers[2];
// numbers is ['zero', 'one', undefined, 'shi', 'go']
You are currently reading a PREVIEW of this book.
Get instant access to over
$1 million worth of books and videos.
Start a Free Trial