Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

array delete

//Warning !
//Array elements can be deleted using the JavaScript operator delete.
//Using delete leaves undefined holes in the array.
//Use pop() or shift() instead

const fruits = ["Banana", "Orange", "Apple", "Mango"];
delete fruits[0];Warning !
// >> ["undefined", "Orange", "Apple", "Mango"];

  //if you find this answer is useful ,
//upvote ⇑⇑ , so can the others benefit also . @mohammad alshraideh ( ͡~ ͜ʖ ͡°)
Source by love2dev.com #
 
PREVIOUS NEXT
Tagged: #array #delete
ADD COMMENT
Topic
Name
4+7 =