Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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
 
PREVIOUS NEXT
Tagged: #typescript #clear #array
ADD COMMENT
Topic
Name
1+1 =