Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript empty array

arr = [];   // set array=[]

//function
const empty = arr => arr.length = 0;
//example
var arr= [1,2,3,4,5];
empty(arr) // arr=[]
Source by 1loc.dev #
 
PREVIOUS NEXT
Tagged: #javascript #empty #array
ADD COMMENT
Topic
Name
6+3 =