use empty for clearing javascript code example
Example: empty array js
let list = [1, 2, 3, 4];
function empty() {
//empty your array
list.length = 0;
}
empty();
let list = [1, 2, 3, 4];
function empty() {
//empty your array
list.length = 0;
}
empty();