function to remove all the elements of an array in javascript code example
Example: js delete all from array
var list = [1, 2, 3, 4];
function empty() {
//empty your array
list.length = 0;
}
empty();
var list = [1, 2, 3, 4];
function empty() {
//empty your array
list.length = 0;
}
empty();