Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

delete an element to an array

var colors = ["red", "orange", "yellow", "green"];
colors = colors.splice(3, 1); // Starts removing from the third element, and deletes 1 element
// Array.splice(startingElement, elementYouWantToRemove);
Source by bytearcher.com #
 
PREVIOUS NEXT
Tagged: #delete #element #array
ADD COMMENT
Topic
Name
7+1 =