angular clear array code example
Example: typescript clear array
const array: Array<number> = new Array<number>();
array.push(1);
array.push(2);
array.push(3);
array.push(4);
// has now 4 elemnts
array = [];
// has now 0 elements
const array: Array<number> = new Array<number>();
array.push(1);
array.push(2);
array.push(3);
array.push(4);
// has now 4 elemnts
array = [];
// has now 0 elements