xxxxxxxxxx
var cars = ["mazda","honda","tesla"];
cars = []; // clear/empty the array
xxxxxxxxxx
$foo = array(); // $foo is here again
unset($foo); // $foo is gone
xxxxxxxxxx
var ar = [1, 2, 3, 4, 5, 6];
//do stuffar = [];
//a new, empty array!