Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript remove all element in array

var list = [1, 2, 3, 4];
function empty() {
    //empty your array
    list.length = 0;
}
empty();

// or use splice() method.
list.splice(0);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #remove #element #array
ADD COMMENT
Topic
Name
7+5 =