var colors = ["red","blue","green"]; colors = []; //empty the array
A = [];
A.length = 0
let list = [1, 2, 3, 4]; function empty() { //empty your array list.length = 0; } empty();
const colors = ["red","blue","green"]; colors.lenght = 0;